Skip to content

Commit 827589b

Browse files
committed
Add rand feature
Currently we activate the "bitcoin/rand-std" feature unconditionally in `json`. Some users may not wish to use the bitcoin "rand" feature. Add a "rand" feature to `json` and `client` and use it to activate "rand-std" in `bitcoin`.
1 parent 3a3446a commit 827589b

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Diff for: client/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ edition = "2018"
1818
name = "bitcoincore_rpc"
1919
path = "src/lib.rs"
2020

21+
[features]
22+
rand = ["bitcoincore-rpc-json/rand"]
23+
2124
[dependencies]
2225
bitcoincore-rpc-json = { version = "0.18.0", path = "../json" }
2326

Diff for: integration_test/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["Steven Roose <[email protected]>"]
55
edition = "2018"
66

77
[dependencies]
8-
bitcoincore-rpc = { path = "../client" }
8+
bitcoincore-rpc = { path = "../client", features = ["rand"] }
99
bitcoin = { version = "0.32.0", features = ["serde", "rand"] }
1010
lazy_static = "1.4.0"
1111
log = "0.4"

Diff for: json/Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ rust-version = "1.56.1"
1919
name = "bitcoincore_rpc_json"
2020
path = "src/lib.rs"
2121

22+
[features]
23+
rand = ["bitcoin/rand-std"]
24+
2225
[dependencies]
2326
serde = { version = "1", features = [ "derive" ] }
2427
serde_json = "1"
2528

26-
bitcoin = { version = "0.32.0", features = ["serde", "rand-std"] }
29+
bitcoin = { version = "0.32.0", features = ["serde"] }

0 commit comments

Comments
 (0)