Skip to content

Commit e20a116

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 d71ac1b commit e20a116

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Diff for: client/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ path = "src/lib.rs"
2020

2121
[features]
2222
verifymessage = ["bitcoincore-rpc-json/verifymessage"]
23+
rand = ["bitcoincore-rpc-json/rand"]
2324

2425
[dependencies]
2526
bitcoincore-rpc-json = { version = "0.18.0", path = "../json" }

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", features = ["verifymessage"] }
8+
bitcoincore-rpc = { path = "../client", features = ["verifymessage", "rand"] }
99
bitcoin = { version = "0.32.0", features = ["serde", "rand", "base64"]}
1010
lazy_static = "1.4.0"
1111
log = "0.4"

Diff for: json/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ path = "src/lib.rs"
2121

2222
[features]
2323
verifymessage = ["bitcoin/base64"]
24+
rand = ["bitcoin/rand-std"]
2425

2526
[dependencies]
2627
serde = { version = "1.0.156", features = [ "derive" ] }
2728
serde_json = "1.0.96"
2829

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

0 commit comments

Comments
 (0)