Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion crates/bitcoind_rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ bdk_chain = { path = "../chain", version = "0.13", default-features = false }

[dev-dependencies]
bdk_testenv = { path = "../testenv", default_features = false }
anyhow = { version = "1" }

[features]
default = ["std"]
Expand Down
2 changes: 1 addition & 1 deletion crates/bitcoind_rpc/tests/test_emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use bdk_chain::{
local_chain::{CheckPoint, LocalChain},
Append, BlockId, IndexedTxGraph, SpkTxOutIndex,
};
use bdk_testenv::TestEnv;
use bdk_testenv::{anyhow, TestEnv};
use bitcoin::{hashes::Hash, Block, OutPoint, ScriptBuf, WScriptHash};
use bitcoincore_rpc::RpcApi;

Expand Down
4 changes: 1 addition & 3 deletions crates/electrum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@ electrum-client = { version = "0.19" }
#rustls = { version = "=0.21.1", optional = true, features = ["dangerous_configuration"] }

[dev-dependencies]
bdk_testenv = { path = "../testenv", default-features = false }
electrsd = { version= "0.27.1", features = ["bitcoind_25_0", "esplora_a33e97e1", "legacy"] }
anyhow = "1"
bdk_testenv = { path = "../testenv", default-features = false }
4 changes: 1 addition & 3 deletions crates/electrum/tests/test_electrum.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
use anyhow::Result;
use bdk_chain::{
bitcoin::{hashes::Hash, Address, Amount, ScriptBuf, WScriptHash},
keychain::Balance,
local_chain::LocalChain,
ConfirmationTimeHeightAnchor, IndexedTxGraph, SpkTxOutIndex,
};
use bdk_electrum::{ElectrumExt, ElectrumUpdate};
use bdk_testenv::TestEnv;
use electrsd::bitcoind::bitcoincore_rpc::RpcApi;
use bdk_testenv::{anyhow, anyhow::Result, bitcoincore_rpc::RpcApi, TestEnv};

fn get_balance(
recv_chain: &LocalChain,
Expand Down
2 changes: 0 additions & 2 deletions crates/esplora/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ miniscript = { version = "11.0.0", optional = true, default-features = false }

[dev-dependencies]
bdk_testenv = { path = "../testenv", default_features = false }
electrsd = { version= "0.27.1", features = ["bitcoind_25_0", "esplora_a33e97e1", "legacy"] }
tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros"] }
anyhow = "1"

[features]
default = ["std", "async-https", "blocking-https-rustls"]
Expand Down
3 changes: 1 addition & 2 deletions crates/esplora/src/async_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,7 @@ mod test {
local_chain::LocalChain,
BlockId,
};
use bdk_testenv::TestEnv;
use electrsd::bitcoind::bitcoincore_rpc::RpcApi;
use bdk_testenv::{anyhow, bitcoincore_rpc::RpcApi, TestEnv};
use esplora_client::Builder;

use crate::async_ext::{chain_update, fetch_latest_blocks};
Expand Down
3 changes: 1 addition & 2 deletions crates/esplora/src/blocking_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,7 @@ mod test {
use bdk_chain::bitcoin::Txid;
use bdk_chain::local_chain::LocalChain;
use bdk_chain::BlockId;
use bdk_testenv::TestEnv;
use electrsd::bitcoind::bitcoincore_rpc::RpcApi;
use bdk_testenv::{anyhow, bitcoincore_rpc::RpcApi, TestEnv};
use esplora_client::{BlockHash, Builder};
use std::collections::{BTreeMap, BTreeSet};
use std::time::Duration;
Expand Down
4 changes: 1 addition & 3 deletions crates/esplora/tests/async_ext.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
use bdk_chain::spk_client::{FullScanRequest, SyncRequest};
use bdk_esplora::EsploraAsyncExt;
use electrsd::bitcoind::anyhow;
use electrsd::bitcoind::bitcoincore_rpc::RpcApi;
use esplora_client::{self, Builder};
use std::collections::{BTreeSet, HashSet};
use std::str::FromStr;
use std::thread::sleep;
use std::time::Duration;

use bdk_chain::bitcoin::{Address, Amount, Txid};
use bdk_testenv::TestEnv;
use bdk_testenv::{anyhow, bitcoincore_rpc::RpcApi, TestEnv};

#[tokio::test]
pub async fn test_update_tx_graph_without_keychain() -> anyhow::Result<()> {
Expand Down
4 changes: 1 addition & 3 deletions crates/esplora/tests/blocking_ext.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
use bdk_chain::spk_client::{FullScanRequest, SyncRequest};
use bdk_esplora::EsploraExt;
use electrsd::bitcoind::anyhow;
use electrsd::bitcoind::bitcoincore_rpc::RpcApi;
use esplora_client::{self, Builder};
use std::collections::{BTreeSet, HashSet};
use std::str::FromStr;
use std::thread::sleep;
use std::time::Duration;

use bdk_chain::bitcoin::{Address, Amount, Txid};
use bdk_testenv::TestEnv;
use bdk_testenv::{anyhow, bitcoincore_rpc::RpcApi, TestEnv};

#[test]
pub fn test_update_tx_graph_without_keychain() -> anyhow::Result<()> {
Expand Down
2 changes: 0 additions & 2 deletions crates/testenv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ readme = "README.md"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bitcoincore-rpc = { version = "0.18" }
bdk_chain = { path = "../chain", version = "0.13", default-features = false }
electrsd = { version= "0.27.1", features = ["bitcoind_25_0", "esplora_a33e97e1", "legacy"] }
anyhow = { version = "1" }

[features]
default = ["std"]
Expand Down
8 changes: 6 additions & 2 deletions crates/testenv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ use bitcoincore_rpc::{
bitcoincore_rpc_json::{GetBlockTemplateModes, GetBlockTemplateRules},
RpcApi,
};
pub use electrsd;
Comment thread
LagginTimes marked this conversation as resolved.
pub use electrsd::bitcoind;
pub use electrsd::bitcoind::anyhow;
pub use electrsd::bitcoind::bitcoincore_rpc;
pub use electrsd::electrum_client;
use electrsd::electrum_client::ElectrumApi;
use std::time::Duration;

Expand Down Expand Up @@ -261,8 +266,7 @@ impl TestEnv {
#[cfg(test)]
mod test {
use crate::TestEnv;
use anyhow::Result;
use bitcoincore_rpc::RpcApi;
use electrsd::bitcoind::{anyhow::Result, bitcoincore_rpc::RpcApi};

/// This checks that reorgs initiated by `bitcoind` is detected by our `electrsd` instance.
#[test]
Expand Down