Skip to content

Commit

Permalink
Add rand feature
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
tcharding committed May 1, 2024
1 parent d71ac1b commit e20a116
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ path = "src/lib.rs"

[features]
verifymessage = ["bitcoincore-rpc-json/verifymessage"]
rand = ["bitcoincore-rpc-json/rand"]

[dependencies]
bitcoincore-rpc-json = { version = "0.18.0", path = "../json" }
Expand Down
2 changes: 1 addition & 1 deletion integration_test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Steven Roose <[email protected]>"]
edition = "2018"

[dependencies]
bitcoincore-rpc = { path = "../client", features = ["verifymessage"] }
bitcoincore-rpc = { path = "../client", features = ["verifymessage", "rand"] }
bitcoin = { version = "0.32.0", features = ["serde", "rand", "base64"]}
lazy_static = "1.4.0"
log = "0.4"
3 changes: 2 additions & 1 deletion json/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ path = "src/lib.rs"

[features]
verifymessage = ["bitcoin/base64"]
rand = ["bitcoin/rand-std"]

[dependencies]
serde = { version = "1.0.156", features = [ "derive" ] }
serde_json = "1.0.96"

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

0 comments on commit e20a116

Please sign in to comment.