Skip to content

Commit fc7206b

Browse files
committed
use core_rpc instead of bitcoincore_rpc so we depend on bitcoin 0.27
1 parent 5b8a01a commit fc7206b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ documentation = "https://docs.rs/bitcoind/"
99
edition = "2018"
1010

1111
[dependencies]
12-
bitcoincore-rpc = "0.13"
12+
core-rpc = "0.14"
1313
tempfile = "3.1"
1414
log = "0.4"
1515
home = "0.5.3" # use same ver in build-dep

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//! Utility to run a regtest bitcoind process, useful in integration testing environment
77
//!
88
//! ```no_run
9-
//! use bitcoincore_rpc::RpcApi;
9+
//! use core_rpc::RpcApi;
1010
//! let bitcoind = bitcoind::BitcoinD::new("/usr/local/bin/bitcoind").unwrap();
1111
//! assert_eq!(0, bitcoind.client.get_blockchain_info().unwrap().blocks);
1212
//! ```
@@ -24,7 +24,7 @@ use std::thread;
2424
use std::time::Duration;
2525
use tempfile::TempDir;
2626

27-
pub extern crate bitcoincore_rpc;
27+
pub extern crate core_rpc as bitcoincore_rpc;
2828
pub extern crate tempfile;
2929

3030
/// Struct representing the bitcoind process with related information
@@ -181,7 +181,7 @@ impl BitcoinD {
181181
let client = loop {
182182
thread::sleep(Duration::from_millis(500));
183183
assert!(process.stderr.is_none());
184-
let client_result = Client::new(rpc_url.clone(), Auth::CookieFile(cookie_file.clone()));
184+
let client_result = Client::new(&rpc_url, Auth::CookieFile(cookie_file.clone()));
185185
if let Ok(client_base) = client_result {
186186
// RpcApi has get_blockchain_info method, however being generic with `Value` allows
187187
// to be compatible with different version, in the end we are only interested if
@@ -190,7 +190,7 @@ impl BitcoinD {
190190
client_base
191191
.create_wallet("default", None, None, None, None)
192192
.unwrap();
193-
break Client::new(node_url_default, Auth::CookieFile(cookie_file.clone()))
193+
break Client::new(&node_url_default, Auth::CookieFile(cookie_file.clone()))
194194
.unwrap();
195195
}
196196
}
@@ -244,7 +244,7 @@ impl BitcoinD {
244244
.client
245245
.create_wallet(wallet.as_ref(), None, None, None, None)?;
246246
Ok(Client::new(
247-
self.rpc_url_with_wallet(wallet),
247+
&self.rpc_url_with_wallet(wallet),
248248
Auth::CookieFile(self.params.cookie_file.clone()),
249249
)?)
250250
}

0 commit comments

Comments
 (0)