diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index f5d401e..ef070dc 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -10,7 +10,9 @@ jobs: RUSTFLAGS: "-Cinstrument-coverage" RUSTDOCFLAGS: "-Cinstrument-coverage" LLVM_PROFILE_FILE: "report-%p-%m.profraw" - + NETWORK_ID: 1905960821 + PRIVATE_KEY: cUJN5RVzYWFoeY8rUztd47jzXCu1p57Ay8V7pqCzsBD3PEXN7Dd4 + GENESIS_BLOCK: 0100000000000000000000000000000000000000000000000000000000000000000000002b5331139c6bc8646bb4e5737c51378133f70b9712b75548cb3c05f9188670e7440d295e7300c5640730c4634402a3e66fb5d921f76b48d8972a484cc0361e66ef74f45e012103af80b90d25145da28c583359beb47b21796b2fe1a23c1511e443e7a64dfdb27d40e05f064662d6b9acf65ae416379d82e11a9b78cdeb3a316d1057cd2780e3727f70a61f901d10acbe349cd11e04aa6b4351e782c44670aefbe138e99a5ce75ace01010000000100000000000000000000000000000000000000000000000000000000000000000000000000ffffffff0100f2052a010000001976a91445d405b9ed450fec89044f9b7a99a4ef6fe2cd3f88ac00000000 steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/cont_integration.yml b/.github/workflows/cont_integration.yml index b3b6b28..cf421a4 100644 --- a/.github/workflows/cont_integration.yml +++ b/.github/workflows/cont_integration.yml @@ -13,6 +13,10 @@ jobs: build-test: runs-on: ubuntu-latest + env: + NETWORK_ID: 1905960821 + PRIVATE_KEY: cUJN5RVzYWFoeY8rUztd47jzXCu1p57Ay8V7pqCzsBD3PEXN7Dd4 + GENESIS_BLOCK: 0100000000000000000000000000000000000000000000000000000000000000000000002b5331139c6bc8646bb4e5737c51378133f70b9712b75548cb3c05f9188670e7440d295e7300c5640730c4634402a3e66fb5d921f76b48d8972a484cc0361e66ef74f45e012103af80b90d25145da28c583359beb47b21796b2fe1a23c1511e443e7a64dfdb27d40e05f064662d6b9acf65ae416379d82e11a9b78cdeb3a316d1057cd2780e3727f70a61f901d10acbe349cd11e04aa6b4351e782c44670aefbe138e99a5ce75ace01010000000100000000000000000000000000000000000000000000000000000000000000000000000000ffffffff0100f2052a010000001976a91445d405b9ed450fec89044f9b7a99a4ef6fe2cd3f88ac00000000 strategy: matrix: rust: diff --git a/Cargo.toml b/Cargo.toml index f26c04c..c8a640c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,11 +4,11 @@ version = "0.9.0" edition = "2018" authors = ["Alekos Filini "] license = "MIT" -homepage = "https://github.com/bitcoindevkit/rust-esplora-client" -repository = "https://github.com/bitcoindevkit/rust-esplora-client" +homepage = "https://github.com/chaintope/rust-esplora-client" +repository = "https://github.com/chaintope/rust-esplora-client" documentation = "https://docs.rs/esplora-client/" -description = "Bitcoin Esplora API client library. Supports plaintext, TLS and Onion servers. Blocking or async" -keywords = ["bitcoin", "esplora"] +description = "Tapyrus Esplora API client library. Supports plaintext, TLS and Onion servers. Blocking or async" +keywords = ["tapyrus", "esplora"] readme = "README.md" rust-version = "1.63.0" @@ -18,7 +18,7 @@ path = "src/lib.rs" [dependencies] serde = { version = "1.0", features = ["derive"] } -bitcoin = { version = "0.32", features = ["serde", "std"], default-features = false } +tapyrus = { git = "https://github.com/chaintope/rust-tapyrus", branch = "update_on_bitcoin_0.31.x", default-features = false, features = ["serde", "std"] } hex = { package = "hex-conservative", version = "0.2" } log = "^0.4" minreq = { version = "2.11.0", features = ["json-using-serde"], optional = true } @@ -27,7 +27,7 @@ reqwest = { version = "0.11", optional = true, default-features = false, feature [dev-dependencies] serde_json = "1.0" tokio = { version = "1.20.1", features = ["full"] } -electrsd = { version = "0.28.0", features = ["legacy", "esplora_a33e97e1", "bitcoind_25_0"] } +electrsd = { git = "https://github.com/chaintope/electrsd", features = ["legacy", "electrs_0_5_1", "tapyrusd_0_5_2"] } lazy_static = "1.4.0" [features] diff --git a/src/api.rs b/src/api.rs index d4dfa1e..940a1f1 100644 --- a/src/api.rs +++ b/src/api.rs @@ -2,10 +2,10 @@ //! //! see: -pub use bitcoin::consensus::{deserialize, serialize}; -pub use bitcoin::hex::FromHex; -use bitcoin::Weight; -pub use bitcoin::{ +pub use tapyrus::consensus::{deserialize, serialize}; +pub use tapyrus::hex::FromHex; +use tapyrus::Weight; +pub use tapyrus::{ transaction, Amount, BlockHash, OutPoint, ScriptBuf, Transaction, TxIn, TxOut, Txid, Witness, }; @@ -83,7 +83,7 @@ pub struct Tx { #[derive(Deserialize, Clone, Debug, PartialEq, Eq)] pub struct BlockTime { - pub timestamp: u64, + pub time: u64, pub height: u32, } @@ -93,15 +93,15 @@ pub struct BlockSummary { #[serde(flatten)] pub time: BlockTime, /// Hash of the previous block, will be `None` for the genesis block. - pub previousblockhash: Option, - pub merkle_root: bitcoin::hash_types::TxMerkleNode, + pub previousblockhash: Option, + pub merkle_root: tapyrus::hash_types::TxMerkleNode, } impl Tx { pub fn to_tx(&self) -> Transaction { Transaction { version: transaction::Version::non_standard(self.version), - lock_time: bitcoin::absolute::LockTime::from_consensus(self.locktime), + lock_time: tapyrus::absolute::LockTime::from_consensus(self.locktime), input: self .vin .iter() @@ -112,7 +112,7 @@ impl Tx { vout: vin.vout, }, script_sig: vin.scriptsig, - sequence: bitcoin::Sequence(vin.sequence), + sequence: tapyrus::Sequence(vin.sequence), witness: Witness::from_slice(&vin.witness), }) .collect(), @@ -121,7 +121,7 @@ impl Tx { .iter() .cloned() .map(|vout| TxOut { - value: Amount::from_sat(vout.value), + value: Amount::from_tap(vout.value), script_pubkey: vout.scriptpubkey, }) .collect(), @@ -133,9 +133,9 @@ impl Tx { TxStatus { confirmed: true, block_height: Some(height), - block_time: Some(timestamp), + block_time: Some(time), .. - } => Some(BlockTime { timestamp, height }), + } => Some(BlockTime { time, height }), _ => None, } } @@ -147,7 +147,7 @@ impl Tx { .map(|vin| { vin.prevout.map(|po| TxOut { script_pubkey: po.scriptpubkey, - value: Amount::from_sat(po.value), + value: Amount::from_tap(po.value), }) }) .collect() @@ -158,7 +158,7 @@ impl Tx { } pub fn fee(&self) -> Amount { - Amount::from_sat(self.fee) + Amount::from_tap(self.fee) } } diff --git a/src/async.rs b/src/async.rs index bf72a48..cd45acf 100644 --- a/src/async.rs +++ b/src/async.rs @@ -14,10 +14,10 @@ use std::collections::HashMap; use std::str::FromStr; -use bitcoin::consensus::{deserialize, serialize}; -use bitcoin::hashes::{sha256, Hash}; -use bitcoin::hex::{DisplayHex, FromHex}; -use bitcoin::{ +use tapyrus::consensus::{deserialize, serialize}; +use tapyrus::hashes::{sha256, Hash}; +use tapyrus::hex::{DisplayHex, FromHex}; +use tapyrus::{ block::Header as BlockHeader, Block, BlockHash, MerkleBlock, Script, Transaction, Txid, }; diff --git a/src/blocking.rs b/src/blocking.rs index 0448572..6147258 100644 --- a/src/blocking.rs +++ b/src/blocking.rs @@ -20,10 +20,10 @@ use log::{debug, error, info, trace}; use minreq::{Proxy, Request}; -use bitcoin::consensus::{deserialize, serialize, Decodable}; -use bitcoin::hashes::{sha256, Hash}; -use bitcoin::hex::{DisplayHex, FromHex}; -use bitcoin::{ +use tapyrus::consensus::{deserialize, serialize, Decodable}; +use tapyrus::hashes::{sha256, Hash}; +use tapyrus::hex::{DisplayHex, FromHex}; +use tapyrus::{ block::Header as BlockHeader, Block, BlockHash, MerkleBlock, Script, Transaction, Txid, }; @@ -118,7 +118,7 @@ impl BlockingClient { let hex_str = resp.as_str().map_err(Error::Minreq)?; let hex_vec = Vec::from_hex(hex_str).unwrap(); deserialize::(&hex_vec) - .map_err(Error::BitcoinEncoding) + .map_err(Error::TapyrusEncoding) .map(|r| Some(r)) } Err(e) => Err(Error::Minreq(e)), @@ -135,7 +135,7 @@ impl BlockingClient { Ok(resp) => { let hex_str = resp.as_str().map_err(Error::Minreq)?; let hex_vec = Vec::from_hex(hex_str).unwrap(); - deserialize::(&hex_vec).map_err(Error::BitcoinEncoding) + deserialize::(&hex_vec).map_err(Error::TapyrusEncoding) } Err(e) => Err(Error::Minreq(e)), } diff --git a/src/lib.rs b/src/lib.rs index 1523dff..04e9c0d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -71,7 +71,7 @@ use std::collections::HashMap; use std::fmt; use std::num::TryFromIntError; -use bitcoin::consensus; +use tapyrus::consensus; pub mod api; @@ -178,12 +178,12 @@ pub enum Error { Parsing(std::num::ParseIntError), /// Invalid status code, unable to convert to `u16` StatusCode(TryFromIntError), - /// Invalid Bitcoin data returned - BitcoinEncoding(bitcoin::consensus::encode::Error), + /// Invalid Tapyrus data returned + TapyrusEncoding(tapyrus::consensus::encode::Error), /// Invalid hex data returned (attempting to create an array) - HexToArray(bitcoin::hex::HexToArrayError), + HexToArray(tapyrus::hex::HexToArrayError), /// Invalid hex data returned (attempting to create a vector) - HexToBytes(bitcoin::hex::HexToBytesError), + HexToBytes(tapyrus::hex::HexToBytesError), /// Transaction not found TransactionNotFound(Txid), /// Header height not found @@ -221,39 +221,39 @@ impl_error!(::minreq::Error, Minreq, Error); #[cfg(feature = "async")] impl_error!(::reqwest::Error, Reqwest, Error); impl_error!(std::num::ParseIntError, Parsing, Error); -impl_error!(consensus::encode::Error, BitcoinEncoding, Error); -impl_error!(bitcoin::hex::HexToArrayError, HexToArray, Error); -impl_error!(bitcoin::hex::HexToBytesError, HexToBytes, Error); +impl_error!(consensus::encode::Error, TapyrusEncoding, Error); +impl_error!(tapyrus::hex::HexToArrayError, HexToArray, Error); +impl_error!(tapyrus::hex::HexToBytesError, HexToBytes, Error); #[cfg(test)] mod test { use super::*; - use electrsd::{bitcoind, bitcoind::BitcoinD, ElectrsD}; + use electrsd::{tapyrusd, tapyrusd::TapyrusD, ElectrsD}; use lazy_static::lazy_static; use std::env; use tokio::sync::Mutex; #[cfg(all(feature = "blocking", feature = "async"))] use { - bitcoin::hashes::Hash, - bitcoin::Amount, electrsd::{ - bitcoind::bitcoincore_rpc::json::AddressType, bitcoind::bitcoincore_rpc::RpcApi, - electrum_client::ElectrumApi, + electrum_client::ElectrumApi, tapyrusd::tapyruscore_rpc::json::AddressType, + tapyrusd::tapyruscore_rpc::RpcApi, }, std::time::Duration, + tapyrus::hashes::Hash, + tapyrus::Amount, tokio::sync::OnceCell, }; lazy_static! { - static ref BITCOIND: BitcoinD = { - let bitcoind_exe = env::var("BITCOIND_EXE") + static ref TAPYRUSD: TapyrusD = { + let tapyrusd_exe = env::var("TAPYRUSD_EXE") .ok() - .or_else(|| bitcoind::downloaded_exe_path().ok()) + .or_else(|| tapyrusd::downloaded_exe_path().ok()) .expect( - "you need to provide an env var BITCOIND_EXE or specify a bitcoind version feature", + "you need to provide an env var TAPYRUSD_EXE or specify a tapyrus version feature", ); - let conf = bitcoind::Conf::default(); - BitcoinD::with_conf(bitcoind_exe, &conf).unwrap() + let conf = tapyrusd::Conf::default(); + TapyrusD::with_conf(tapyrusd_exe, &conf).unwrap() }; static ref ELECTRSD: ElectrsD = { let electrs_exe = env::var("ELECTRS_EXE") @@ -264,7 +264,7 @@ mod test { ); let mut conf = electrsd::Conf::default(); conf.http_enabled = true; - ElectrsD::with_conf(electrs_exe, &BITCOIND, &conf).unwrap() + ElectrsD::with_conf(electrs_exe, &TAPYRUSD, &conf).unwrap() }; static ref MINER: Mutex<()> = Mutex::new(()); } @@ -305,21 +305,21 @@ mod test { #[cfg(all(feature = "blocking", feature = "async"))] fn generate_blocks_and_wait(num: usize) { - let cur_height = BITCOIND.client.get_block_count().unwrap(); + let cur_height = TAPYRUSD.client.get_block_count().unwrap(); generate_blocks(num); wait_for_block(cur_height as usize + num); } #[cfg(all(feature = "blocking", feature = "async"))] fn generate_blocks(num: usize) { - let address = BITCOIND + let address = TAPYRUSD .client - .get_new_address(Some("test"), Some(AddressType::Legacy)) + .get_new_address(Some("test")) .unwrap() .assume_checked(); - let _block_hashes = BITCOIND + let _block_hashes = TAPYRUSD .client - .generate_to_address(num as u64, &address) + .generate_to_address(num as u64, &address, tapyrusd::get_private_key()) .unwrap(); } @@ -404,16 +404,16 @@ mod test { async fn test_get_tx() { let (blocking_client, async_client) = setup_clients().await; - let address = BITCOIND + let address = TAPYRUSD .client - .get_new_address(Some("test"), Some(AddressType::Legacy)) + .get_new_address(Some("test")) .unwrap() .assume_checked(); - let txid = BITCOIND + let txid = TAPYRUSD .client .send_to_address( &address, - Amount::from_sat(1000), + Amount::from_tap(1000), None, None, None, @@ -435,16 +435,16 @@ mod test { async fn test_get_tx_no_opt() { let (blocking_client, async_client) = setup_clients().await; - let address = BITCOIND + let address = TAPYRUSD .client - .get_new_address(Some("test"), Some(AddressType::Legacy)) + .get_new_address(Some("test")) .unwrap() .assume_checked(); - let txid = BITCOIND + let txid = TAPYRUSD .client .send_to_address( &address, - Amount::from_sat(1000), + Amount::from_tap(1000), None, None, None, @@ -466,16 +466,16 @@ mod test { async fn test_get_tx_status() { let (blocking_client, async_client) = setup_clients().await; - let address = BITCOIND + let address = TAPYRUSD .client - .get_new_address(Some("test"), Some(AddressType::Legacy)) + .get_new_address(Some("test")) .unwrap() .assume_checked(); - let txid = BITCOIND + let txid = TAPYRUSD .client .send_to_address( &address, - Amount::from_sat(1000), + Amount::from_tap(1000), None, None, None, @@ -508,16 +508,16 @@ mod test { async fn test_get_tx_info() { let (blocking_client, async_client) = setup_clients().await; - let address = BITCOIND + let address = TAPYRUSD .client - .get_new_address(Some("test"), Some(AddressType::Legacy)) + .get_new_address(Some("test")) .unwrap() .assume_checked(); - let txid = BITCOIND + let txid = TAPYRUSD .client .send_to_address( &address, - Amount::from_sat(1000), + Amount::from_tap(1000), None, None, None, @@ -529,7 +529,7 @@ mod test { let _miner = MINER.lock().await; generate_blocks_and_wait(1); - let tx_res = BITCOIND.client.get_transaction(&txid, None).unwrap(); + let tx_res = TAPYRUSD.client.get_transaction(&txid, None).unwrap(); let tx_exp = tx_res.transaction().expect("must decode"); let tx_info = blocking_client @@ -546,9 +546,11 @@ mod test { assert_eq!(tx_info.to_tx(), tx_exp); assert_eq!(tx_info.size, tx_exp.total_size()); assert_eq!(tx_info.weight(), tx_exp.weight()); - assert_eq!(tx_info.fee(), tx_res.fee.unwrap().unsigned_abs()); + assert_eq!( + tx_info.fee(), + tx_res.fee.unwrap().abs().to_unsigned().unwrap() + ); assert!(tx_info.status.confirmed); - assert_eq!(tx_info.status.block_height, tx_res.info.blockheight); assert_eq!(tx_info.status.block_hash, tx_res.info.blockhash); assert_eq!(tx_info.status.block_time, tx_res.info.blocktime); @@ -562,7 +564,7 @@ mod test { async fn test_get_header_by_hash() { let (blocking_client, async_client) = setup_clients().await; - let block_hash = BITCOIND.client.get_block_hash(23).unwrap(); + let block_hash = TAPYRUSD.client.get_block_hash(23).unwrap(); let block_header = blocking_client.get_header_by_hash(&block_hash).unwrap(); let block_header_async = async_client.get_header_by_hash(&block_hash).await.unwrap(); @@ -574,8 +576,8 @@ mod test { async fn test_get_block_status() { let (blocking_client, async_client) = setup_clients().await; - let block_hash = BITCOIND.client.get_block_hash(21).unwrap(); - let next_block_hash = BITCOIND.client.get_block_hash(22).unwrap(); + let block_hash = TAPYRUSD.client.get_block_hash(21).unwrap(); + let next_block_hash = TAPYRUSD.client.get_block_hash(22).unwrap(); let expected = BlockStatus { in_best_chain: true, @@ -619,9 +621,9 @@ mod test { async fn test_get_block_by_hash() { let (blocking_client, async_client) = setup_clients().await; - let block_hash = BITCOIND.client.get_block_hash(21).unwrap(); + let block_hash = TAPYRUSD.client.get_block_hash(21).unwrap(); - let expected = Some(BITCOIND.client.get_block(&block_hash).unwrap()); + let expected = Some(TAPYRUSD.client.get_block(&block_hash).unwrap()); let block = blocking_client.get_block_by_hash(&block_hash).unwrap(); let block_async = async_client.get_block_by_hash(&block_hash).await.unwrap(); @@ -634,16 +636,16 @@ mod test { async fn test_that_errors_are_propagated() { let (blocking_client, async_client) = setup_clients().await; - let address = BITCOIND + let address = TAPYRUSD .client - .get_new_address(Some("test"), Some(AddressType::Legacy)) + .get_new_address(Some("test")) .unwrap() .assume_checked(); - let txid = BITCOIND + let txid = TAPYRUSD .client .send_to_address( &address, - Amount::from_sat(1000), + Amount::from_tap(1000), None, None, None, @@ -659,9 +661,9 @@ mod test { let async_res = async_client.broadcast(tx.as_ref().unwrap()).await; let blocking_res = blocking_client.broadcast(tx.as_ref().unwrap()); assert!(async_res.is_err()); - assert_eq!(async_res.unwrap_err().to_string(),"HttpResponse { status: 400, message: \"sendrawtransaction RPC error: {\\\"code\\\":-27,\\\"message\\\":\\\"Transaction already in block chain\\\"}\" }"); + assert_eq!(async_res.unwrap_err().to_string(),"HttpResponse { status: 400, message: \"sendrawtransaction RPC error: {\\\"code\\\":-27,\\\"message\\\":\\\"transaction already in block chain\\\"}\" }"); assert!(blocking_res.is_err()); - assert_eq!(blocking_res.unwrap_err().to_string(),"HttpResponse { status: 400, message: \"sendrawtransaction RPC error: {\\\"code\\\":-27,\\\"message\\\":\\\"Transaction already in block chain\\\"}\" }"); + assert_eq!(blocking_res.unwrap_err().to_string(),"HttpResponse { status: 400, message: \"sendrawtransaction RPC error: {\\\"code\\\":-27,\\\"message\\\":\\\"transaction already in block chain\\\"}\" }"); } #[cfg(all(feature = "blocking", feature = "async"))] @@ -685,16 +687,16 @@ mod test { async fn test_get_merkle_proof() { let (blocking_client, async_client) = setup_clients().await; - let address = BITCOIND + let address = TAPYRUSD .client - .get_new_address(Some("test"), Some(AddressType::Legacy)) + .get_new_address(Some("test")) .unwrap() .assume_checked(); - let txid = BITCOIND + let txid = TAPYRUSD .client .send_to_address( &address, - Amount::from_sat(1000), + Amount::from_tap(1000), None, None, None, @@ -717,16 +719,16 @@ mod test { async fn test_get_merkle_block() { let (blocking_client, async_client) = setup_clients().await; - let address = BITCOIND + let address = TAPYRUSD .client - .get_new_address(Some("test"), Some(AddressType::Legacy)) + .get_new_address(Some("test")) .unwrap() .assume_checked(); - let txid = BITCOIND + let txid = TAPYRUSD .client .send_to_address( &address, - Amount::from_sat(1000), + Amount::from_tap(1000), None, None, None, @@ -748,7 +750,7 @@ mod test { .txn .extract_matches(&mut matches, &mut indexes) .unwrap(); - assert_eq!(root, merkle_block.header.merkle_root); + assert_eq!(root, merkle_block.header.im_merkle_root); assert_eq!(indexes.len(), 1); assert!(indexes[0] > 0); } @@ -758,16 +760,16 @@ mod test { async fn test_get_output_status() { let (blocking_client, async_client) = setup_clients().await; - let address = BITCOIND + let address = TAPYRUSD .client - .get_new_address(Some("test"), Some(AddressType::Legacy)) + .get_new_address(Some("test")) .unwrap() .assume_checked(); - let txid = BITCOIND + let txid = TAPYRUSD .client .send_to_address( &address, - Amount::from_sat(1000), + Amount::from_tap(1000), None, None, None, @@ -816,7 +818,7 @@ mod test { async fn test_get_block_hash() { let (blocking_client, async_client) = setup_clients().await; - let block_hash = BITCOIND.client.get_block_hash(21).unwrap(); + let block_hash = TAPYRUSD.client.get_block_hash(21).unwrap(); let block_hash_blocking = blocking_client.get_block_hash(21).unwrap(); let block_hash_async = async_client.get_block_hash(21).await.unwrap(); @@ -829,7 +831,7 @@ mod test { async fn test_get_txid_at_block_index() { let (blocking_client, async_client) = setup_clients().await; - let block_hash = BITCOIND.client.get_block_hash(23).unwrap(); + let block_hash = TAPYRUSD.client.get_block_hash(23).unwrap(); let txid_at_block_index = blocking_client .get_txid_at_block_index(&block_hash, 0) @@ -857,16 +859,16 @@ mod test { async fn test_scripthash_txs() { let (blocking_client, async_client) = setup_clients().await; - let address = BITCOIND + let address = TAPYRUSD .client - .get_new_address(Some("test"), Some(AddressType::Legacy)) + .get_new_address(Some("test")) .unwrap() .assume_checked(); - let txid = BITCOIND + let txid = TAPYRUSD .client .send_to_address( &address, - Amount::from_sat(1000), + Amount::from_tap(1000), None, None, None, @@ -878,7 +880,7 @@ mod test { let _miner = MINER.lock().await; generate_blocks_and_wait(1); - let expected_tx = BITCOIND + let expected_tx = TAPYRUSD .client .get_transaction(&txid, None) .unwrap() @@ -905,7 +907,7 @@ mod test { #[tokio::test] async fn test_get_blocks() { let (blocking_client, async_client) = setup_clients().await; - let start_height = BITCOIND.client.get_block_count().unwrap(); + let start_height = TAPYRUSD.client.get_block_count().unwrap(); let blocks1 = blocking_client.get_blocks(None).unwrap(); let blocks_async1 = async_client.get_blocks(None).await.unwrap(); assert_eq!(blocks1[0].time.height, start_height as u32); @@ -940,16 +942,16 @@ mod test { .into(); let (blocking_client, async_client) = setup_clients_with_headers(headers).await; - let address = BITCOIND + let address = TAPYRUSD .client - .get_new_address(Some("test"), Some(AddressType::Legacy)) + .get_new_address(Some("test")) .unwrap() .assume_checked(); - let txid = BITCOIND + let txid = TAPYRUSD .client .send_to_address( &address, - Amount::from_sat(1000), + Amount::from_tap(1000), None, None, None,