Skip to content

Commit 7c55c78

Browse files
committed
Use bitcoincore-rpc 0.14.0 release
Since it now uses `bitcoin` 0.27
1 parent 5ae3d65 commit 7c55c78

File tree

7 files changed

+36
-36
lines changed

7 files changed

+36
-36
lines changed

Cargo.lock

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ spec = "internal/config_specification.toml"
2222
[dependencies]
2323
anyhow = "1.0"
2424
bitcoin = { version = "0.27.1", features = ["use-serde", "rand"] }
25+
bitcoincore-rpc = "0.14.0"
2526
configure_me = "0.4"
2627
crossbeam-channel = "0.5"
2728
dirs-next = "2.0"
@@ -36,9 +37,6 @@ serde_json = "1.0"
3637
signal-hook = "0.3"
3738
tiny_http = { version = "0.8", optional = true }
3839

39-
[dependencies.core-rpc]
40-
version = "0.15.0" # Use bitcoincore-rpc fork for now
41-
4240
[dependencies.electrs-rocksdb]
4341
# support building with Rust 1.41.1 and workaround the following issues:
4442
# https://github.com/romanz/electrs/issues/403 (support building on ARM 32-bit)

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use bitcoin::network::constants::Network;
2-
use core_rpc::Auth;
2+
use bitcoincore_rpc::Auth;
33
use dirs_next::home_dir;
44

55
use std::ffi::{OsStr, OsString};

src/daemon.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use anyhow::{Context, Result};
33
use bitcoin::{
44
consensus::serialize, hashes::hex::ToHex, Amount, Block, BlockHash, Transaction, Txid,
55
};
6-
use core_rpc::{json, jsonrpc, Auth, Client, RpcApi};
6+
use bitcoincore_rpc::{json, jsonrpc, Auth, Client, RpcApi};
77
use parking_lot::Mutex;
88
use serde_json::{json, Value};
99

@@ -224,10 +224,12 @@ impl Daemon {
224224
}
225225
}
226226

227-
pub(crate) type RpcError = core_rpc::jsonrpc::error::RpcError;
227+
pub(crate) type RpcError = bitcoincore_rpc::jsonrpc::error::RpcError;
228228

229-
pub(crate) fn extract_bitcoind_error(err: &core_rpc::Error) -> Option<&RpcError> {
230-
use core_rpc::{jsonrpc::error::Error::Rpc as ServerError, Error::JsonRpc as JsonRpcError};
229+
pub(crate) fn extract_bitcoind_error(err: &bitcoincore_rpc::Error) -> Option<&RpcError> {
230+
use bitcoincore_rpc::{
231+
jsonrpc::error::Error::Rpc as ServerError, Error::JsonRpc as JsonRpcError,
232+
};
231233
match err {
232234
JsonRpcError(ServerError(e)) => Some(e),
233235
_ => None,

src/electrum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ impl Rpc {
446446
Err(err) => {
447447
warn!("RPC {} failed: {:#}", method, err);
448448
match err
449-
.downcast_ref::<core_rpc::Error>()
449+
.downcast_ref::<bitcoincore_rpc::Error>()
450450
.and_then(extract_bitcoind_error)
451451
{
452452
Some(e) => error_msg(id, RpcError::DaemonError(e.clone())),

src/mempool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::ops::Bound;
77

88
use bitcoin::hashes::Hash;
99
use bitcoin::{Amount, OutPoint, Transaction, Txid};
10-
use core_rpc::json;
10+
use bitcoincore_rpc::json;
1111
use rayon::prelude::*;
1212
use serde::ser::{Serialize, SerializeSeq, Serializer};
1313

src/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use anyhow::{Context, Result};
22
use bitcoin::BlockHash;
3-
use core_rpc::RpcApi;
3+
use bitcoincore_rpc::RpcApi;
44
use crossbeam_channel::{bounded, select, unbounded, Receiver, Sender};
55
use rayon::prelude::*;
66

0 commit comments

Comments
 (0)