diff --git a/roles/tests-integration/Cargo.toml b/roles/tests-integration/Cargo.toml index 81d468596..262907dd6 100644 --- a/roles/tests-integration/Cargo.toml +++ b/roles/tests-integration/Cargo.toml @@ -12,8 +12,8 @@ keywords = ["stratum", "mining", "bitcoin", "protocol"] [dependencies] async-channel = "1.5.1" +corepc-node = "0.5.0" binary_sv2 = { path = "../../protocols/v2/binary-sv2/binary-sv2" } -bitcoind = "0.36.0" codec_sv2 = { path = "../../protocols/v2/codec-sv2", features = ["noise_sv2"] } const_sv2 = { path = "../../protocols/v2/const-sv2" } flate2 = "1.0.32" diff --git a/roles/tests-integration/lib/template_provider.rs b/roles/tests-integration/lib/template_provider.rs index 17ce20c18..6670e625b 100644 --- a/roles/tests-integration/lib/template_provider.rs +++ b/roles/tests-integration/lib/template_provider.rs @@ -1,4 +1,4 @@ -use bitcoind::{bitcoincore_rpc::RpcApi, BitcoinD, Conf}; +use corepc_node::{Conf, Node}; use flate2::read::GzDecoder; use std::{ env, @@ -62,7 +62,7 @@ fn get_bitcoind_filename(os: &str, arch: &str) -> String { #[derive(Debug)] pub struct TemplateProvider { - bitcoind: BitcoinD, + bitcoind: Node, } impl TemplateProvider { @@ -127,24 +127,18 @@ impl TemplateProvider { } env::set_var("BITCOIND_EXE", bitcoin_exe_home.join("bitcoind")); - let exe_path = bitcoind::exe_path().unwrap(); + let exe_path = corepc_node::exe_path().unwrap(); - let bitcoind = BitcoinD::with_conf(exe_path, &conf).unwrap(); + let bitcoind = Node::with_conf(exe_path, &conf).unwrap(); TemplateProvider { bitcoind } } pub fn generate_blocks(&self, n: u64) { - let mining_address = self - .bitcoind - .client - .get_new_address(None, None) - .unwrap() - .require_network(bitcoind::bitcoincore_rpc::bitcoin::Network::Regtest) - .unwrap(); + let mining_address = self.bitcoind.client.new_address().unwrap(); self.bitcoind .client - .generate_to_address(n, &mining_address) + .generate_to_address(n as usize, &mining_address) .unwrap(); } }