Skip to content

Commit 806b654

Browse files
committed
Add verifymessage feature
In rust-bitcoin#326 we changed a function to use `bitcoin::sign_message::MessageSignature` but doing so requires the "base64" feature to be on for `bitcoin`. This did not get caught by CI but improvements to CI in rust-bitcoin#338 will now catch this. Add a feature to `json` and `client` that allows enabling "base64" if the `verifymessage` RPC call is required.
1 parent 33293a5 commit 806b654

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

Diff for: client/Cargo.toml

+10
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+
verifymessage = ["bitcoincore-rpc-json/verifymessage"]
23+
2124
[dependencies]
2225
bitcoincore-rpc-json = { version = "0.18.0", path = "../json" }
2326

@@ -31,3 +34,10 @@ serde_json = "1"
3134
[dev-dependencies]
3235
tempfile = "3.3.0"
3336

37+
[[example]]
38+
name = "retry_client"
39+
required-features = ["verifymessage"]
40+
41+
[[example]]
42+
name = "test_against_node"
43+
required-features = []

Diff for: client/src/client.rs

+1
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,7 @@ pub trait RpcApi: Sized {
871871
self.call("stop", &[])
872872
}
873873

874+
#[cfg(feature = "verifymessage")]
874875
fn verify_message(
875876
&self,
876877
address: &Address,

Diff for: json/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ rust-version = "1.56.1"
1919
name = "bitcoincore_rpc_json"
2020
path = "src/lib.rs"
2121

22+
[features]
23+
verifymessage = ["bitcoin/base64"]
24+
2225
[dependencies]
2326
serde = { version = "1", features = [ "derive" ] }
2427
serde_json = "1"

0 commit comments

Comments
 (0)