Skip to content

Commit

Permalink
Remaining clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
rajarshimaitra committed Aug 7, 2022
1 parent d12d1a7 commit 093ef9d
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 1,221 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ test-blockchains = ["bitcoincore-rpc", "electrum-client"]
test-electrum = ["electrum", "electrsd/electrs_0_8_10", "electrsd/bitcoind_22_0", "test-blockchains"]
test-rpc = ["rpc", "electrsd/electrs_0_8_10", "electrsd/bitcoind_22_0", "test-blockchains"]
test-rpc-legacy = ["rpc", "electrsd/electrs_0_8_10", "electrsd/bitcoind_0_20_0", "test-blockchains"]
test-esplora = ["electrsd/legacy", "electrsd/esplora_a33e97e1", "electrsd/bitcoind_22_0", "test-blockchains"]
test-esplora = ["use-esplora-ureq", "electrsd/legacy", "electrsd/esplora_a33e97e1", "electrsd/bitcoind_22_0", "test-blockchains"]
test-md-docs = ["electrum"]

[dev-dependencies]
Expand Down
6 changes: 0 additions & 6 deletions src/blockchain/electrum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,6 @@ mod test {
use crate::testutils::blockchain_tests::{BlockchainType, TestClient};
use crate::wallet::{AddressIndex, Wallet};

crate::bdk_blockchain_tests! {
fn test_instance(test_client: &TestClient) -> ElectrumBlockchain {
ElectrumBlockchain::from(Client::new(&test_client.electrsd.electrum_url).unwrap())
}
}

make_blockchain_tests![
blockchain BlockchainType::ElectrumBlockchain,
tests (
Expand Down
9 changes: 0 additions & 9 deletions src/blockchain/esplora/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,22 +149,13 @@ impl_error!(std::num::ParseIntError, Parsing, EsploraError);
impl_error!(consensus::encode::Error, BitcoinEncoding, EsploraError);
impl_error!(bitcoin::hashes::hex::Error, Hex, EsploraError);

#[cfg(test)]
#[cfg(feature = "test-esplora")]
crate::bdk_blockchain_tests! {
fn test_instance(test_client: &TestClient) -> EsploraBlockchain {
EsploraBlockchain::new(&format!("http://{}",test_client.electrsd.esplora_url.as_ref().unwrap()), 20)
}
}

const DEFAULT_CONCURRENT_REQUESTS: u8 = 4;

#[cfg(test)]
pub mod test {
use super::*;
use crate::make_blockchain_tests;
use crate::testutils::blockchain_tests::BlockchainType;
use crate::testutils::blockchain_tests::TestClient;

#[cfg(feature = "test-esplora")]
make_blockchain_tests![
Expand Down
13 changes: 0 additions & 13 deletions src/blockchain/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -575,19 +575,6 @@ pub mod test {
use bitcoin::Network;
use bitcoincore_rpc::RpcApi;

crate::bdk_blockchain_tests! {
fn test_instance(test_client: &TestClient) -> RpcBlockchain {
let config = RpcConfig {
url: test_client.bitcoind.rpc_url(),
auth: Auth::Cookie { file: test_client.bitcoind.params.cookie_file.clone() },
network: Network::Regtest,
wallet_name: format!("client-wallet-test-{}", std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap().as_nanos() ),
skip_blocks: None,
};
RpcBlockchain::from_config(&config).unwrap()
}
}

make_blockchain_tests![
blockchain BlockchainType::RpcBlockchain,
tests (
Expand Down
Loading

0 comments on commit 093ef9d

Please sign in to comment.