]> Untitled Git - bdk/commitdiff
Update dev-dependencies electrsd to 0.12
authorSteve Myers <steve@notmandatory.org>
Wed, 27 Oct 2021 20:42:01 +0000 (13:42 -0700)
committerSteve Myers <steve@notmandatory.org>
Wed, 27 Oct 2021 20:42:01 +0000 (13:42 -0700)
Cargo.toml
src/testutils/blockchain_tests.rs

index 3a7097a6b59d3f59f35a6f5d8216b93ebb995d6b..087d9ac5c2c53928a570c25b5180c3e5e4f278aa 100644 (file)
@@ -45,7 +45,7 @@ backtrace = { version = "=0.3.61", optional = true }
 bitcoinconsensus = { version = "0.19.0-3", optional = true }
 
 # Needed by bdk_blockchain_tests macro
-core-rpc = { version = "0.14", optional = true }
+bitcoincore-rpc = { version = "0.14", optional = true }
 
 # Platform-specific dependencies
 [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
@@ -66,7 +66,7 @@ compact_filters = ["rocksdb", "socks", "lazy_static", "cc"]
 key-value-db = ["sled"]
 all-keys = ["keys-bip39"]
 keys-bip39 = ["tiny-bip39", "backtrace"]
-rpc = ["core-rpc"]
+rpc = ["bitcoincore-rpc"]
 
 # We currently provide mulitple implementations of `Blockchain`, all are
 # blocking except for the `EsploraBlockchain` which can be either async or
@@ -91,7 +91,7 @@ esplora = []
 
 
 # Debug/Test features
-test-blockchains = ["core-rpc", "electrum-client"]
+test-blockchains = ["bitcoincore-rpc", "electrum-client"]
 test-electrum = ["electrum", "electrsd/electrs_0_8_10", "test-blockchains"]
 test-rpc = ["rpc", "electrsd/electrs_0_8_10", "test-blockchains"]
 test-esplora = ["electrsd/legacy", "electrsd/esplora_a33e97e1", "test-blockchains"]
@@ -101,7 +101,7 @@ test-md-docs = ["electrum"]
 lazy_static = "1.4"
 env_logger = "0.7"
 clap = "2.33"
-electrsd = { version= "0.10", features = ["trigger", "bitcoind_0_21_1"] }
+electrsd = { version= "0.12", features = ["trigger", "bitcoind_0_21_1"] }
 
 [[example]]
 name = "address_validator"
index 0d1b9167c247dfb0c13d58ef7b79cb4a6e53b501..085745b0527bfc6241a0524f68277ff4a7461080 100644 (file)
@@ -3,11 +3,11 @@ use bitcoin::consensus::encode::{deserialize, serialize};
 use bitcoin::hashes::hex::{FromHex, ToHex};
 use bitcoin::hashes::sha256d;
 use bitcoin::{Address, Amount, Script, Transaction, Txid};
+pub use bitcoincore_rpc::bitcoincore_rpc_json::AddressType;
+pub use bitcoincore_rpc::{Auth, Client as RpcClient, RpcApi};
 use core::str::FromStr;
-pub use core_rpc::core_rpc_json::AddressType;
-pub use core_rpc::{Auth, Client as RpcClient, RpcApi};
 use electrsd::bitcoind::BitcoinD;
-use electrsd::{bitcoind, Conf, ElectrsD};
+use electrsd::{bitcoind, ElectrsD};
 pub use electrum_client::{Client as ElectrumClient, ElectrumApi};
 #[allow(unused_imports)]
 use log::{debug, error, info, log_enabled, trace, Level};
@@ -24,19 +24,15 @@ pub struct TestClient {
 impl TestClient {
     pub fn new(bitcoind_exe: String, electrs_exe: String) -> Self {
         debug!("launching {} and {}", &bitcoind_exe, &electrs_exe);
-        let conf = bitcoind::Conf {
-            view_stdout: log_enabled!(Level::Debug),
-            ..Default::default()
-        };
+
+        let mut conf = bitcoind::Conf::default();
+        conf.view_stdout = log_enabled!(Level::Debug);
         let bitcoind = BitcoinD::with_conf(bitcoind_exe, &conf).unwrap();
 
-        let http_enabled = cfg!(feature = "test-esplora");
+        let mut conf = electrsd::Conf::default();
+        conf.view_stderr = log_enabled!(Level::Debug);
+        conf.http_enabled = cfg!(feature = "test-esplora");
 
-        let conf = Conf {
-            http_enabled,
-            view_stderr: log_enabled!(Level::Debug),
-            ..Default::default()
-        };
         let electrsd = ElectrsD::with_conf(electrs_exe, &bitcoind, &conf).unwrap();
 
         let node_address = bitcoind.client.get_new_address(None, None).unwrap();