//! To only get block updates (exclude mempool transactions), the caller can use
//! [`Emitter::next_block`] until it returns `Ok(None)` (which means the chain tip is reached). A
//! separate method, [`Emitter::mempool`] can be used to emit the whole mempool.
+ #![cfg_attr(coverage_nightly, feature(coverage_attribute))]
#![warn(missing_docs)]
+#[allow(unused_imports)]
+#[macro_use]
+extern crate alloc;
+
+use alloc::sync::Arc;
+use bdk_core::collections::{HashMap, HashSet};
use bdk_core::{BlockId, CheckPoint};
use bitcoin::{Block, BlockHash, Transaction, Txid};
use bitcoincore_rpc::{bitcoincore_rpc_json, RpcApi};
}
#[cfg(test)]
+ #[cfg_attr(coverage_nightly, coverage(off))]
mod test {
- use crate::{bitcoincore_rpc::RpcApi, Emitter, NO_EXPECTED_MEMPOOL_TXIDS};
+ use crate::{bitcoincore_rpc::RpcApi, Emitter, NO_EXPECTED_MEMPOOL_TXS};
use bdk_chain::local_chain::LocalChain;
use bdk_testenv::{anyhow, TestEnv};
use bitcoin::{hashes::Hash, Address, Amount, ScriptBuf, Txid, WScriptHash};
}
#[cfg(test)]
+ #[cfg_attr(coverage_nightly, coverage(off))]
mod test {
use crate::{bdk_electrum_client::TxUpdate, BdkElectrumClient};
- use bdk_chain::bitcoin::{OutPoint, Transaction, TxIn};
- use bdk_core::collections::BTreeMap;
- use bdk_testenv::{utils::new_tx, TestEnv};
+ use bdk_chain::bitcoin::{constants, Network, OutPoint, ScriptBuf, Transaction, TxIn};
+ use bdk_chain::{BlockId, CheckPoint};
+ use bdk_core::{collections::BTreeMap, spk_client::SyncRequest};
+ use bdk_testenv::{anyhow, utils::new_tx, TestEnv};
+ use electrum_client::Error as ElectrumError;
use std::sync::Arc;
#[cfg(feature = "default")]