Skip to content

Commit fc4ea8b

Browse files
committed
f Feature-gate SqliteStore
1 parent a90ba7f commit fc4ea8b

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

bench/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ hashbrown = ["lightning/hashbrown"]
1313

1414
[dependencies]
1515
lightning = { path = "../lightning", features = ["_test_utils", "criterion"] }
16-
lightning-persister = { path = "../lightning-persister", features = ["criterion"] }
16+
lightning-persister = { path = "../lightning-persister", features = ["criterion", "sqlite-bundled"] }
1717
lightning-rapid-gossip-sync = { path = "../lightning-rapid-gossip-sync", features = ["criterion"] }
1818
criterion = { version = "0.4", default-features = false }
1919

lightning-persister/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ edition = "2018"
1313
all-features = true
1414
rustdoc-args = ["--cfg", "docsrs"]
1515

16+
[features]
17+
sqlite = ["rusqlite"]
18+
sqlite-bundled = ["sqlite", "rusqlite/bundled"]
19+
1620
[dependencies]
1721
bitcoin = "0.29.0"
1822
lightning = { version = "0.0.116", path = "../lightning" }
19-
rusqlite = { version = "0.28.0", features = ["bundled"] }
23+
rusqlite = { version = "0.28.0", optional = true, default-features = false}
2024

2125
[target.'cfg(windows)'.dependencies]
2226
windows-sys = { version = "0.48.0", default-features = false, features = ["Win32_Storage_FileSystem", "Win32_Foundation"] }

lightning-persister/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#[cfg(ldk_bench)] extern crate criterion;
1212

1313
pub mod fs_store;
14+
15+
#[cfg(any(test, feature = "sqlite"))]
1416
pub mod sqlite_store;
1517

1618
mod utils;

0 commit comments

Comments
 (0)