Skip to content

Commit

Permalink
Upgrade jsonrpc dependency to v0.18.0
Browse files Browse the repository at this point in the history
Upgrade to the latest released `jsonrpc` version.
  • Loading branch information
tcharding committed May 13, 2024
1 parent 3a3446a commit ee20339
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ path = "src/lib.rs"
bitcoincore-rpc-json = { version = "0.18.0", path = "../json" }

log = "0.4.5"
jsonrpc = "0.14.0"
jsonrpc = { version = "0.18.0", features = [] }

# Used for deserialization of JSON.
serde = "1"
Expand Down
8 changes: 2 additions & 6 deletions client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1313,12 +1313,8 @@ impl RpcApi for Client {
cmd: &str,
args: &[serde_json::Value],
) -> Result<T> {
let raw_args: Vec<_> = args
.iter()
.map(serde_json::value::to_raw_value)
.map(|a| a.map_err(|e| Error::Json(e)))
.collect::<Result<Vec<_>>>()?;
let req = self.client.build_request(&cmd, &raw_args);
let raw = serde_json::value::to_raw_value(args)?;
let req = self.client.build_request(&cmd, Some(&*raw));
if log_enabled!(Debug) {
debug!(target: "bitcoincore_rpc", "JSON-RPC request: {} {}", cmd, serde_json::Value::from(args));
}
Expand Down

0 comments on commit ee20339

Please sign in to comment.