Skip to content

Commit 840c24a

Browse files
committed
update
1 parent 3403b47 commit 840c24a

File tree

9 files changed

+1320
-433
lines changed

9 files changed

+1320
-433
lines changed

light-client-bin/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ckb-systemtime = "1"
1919
ckb-traits = "1"
2020
ckb-types = "1"
2121

22-
ckb-light-client-lib = {path = "../light-client-lib"}
22+
ckb-light-client-lib = {path = "../light-client-lib", default-features = false}
2323
clap = {version = "4", features = ["cargo"]}
2424
ctrlc = {version = "3.2.1", features = ["termination"]}
2525
jsonrpc-core = "18.0"
@@ -51,7 +51,8 @@ tempfile = "3.0"
5151
default = ["rocksdb"]
5252
march-native = ["rocksdb/march-native"]
5353
portable = ["rocksdb/portable"]
54-
54+
rocksdb = ["dep:rocksdb", "ckb-light-client-lib/rocksdb"]
55+
rusqlite = ["ckb-light-client-lib/rusqlite", "dep:rusqlite"]
5556
# [profile.release]
5657
# overflow-checks = true
5758

light-client-bin/src/main.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
mod cli;
22
mod rpc;
3+
#[cfg(any(
4+
all(feature = "rocksdb", feature = "rusqlite"),
5+
not(any(feature = "rocksdb", feature = "rusqlite"))
6+
))]
7+
compile_error!("Exact one of features `rocksdb` and `rusqlite` can be selected");
8+
39
mod subcmds;
410

511
#[cfg(test)]

0 commit comments

Comments
 (0)