diff --git a/tests/transfers.rs b/tests/transfers.rs index be258e1..0b91070 100644 --- a/tests/transfers.rs +++ b/tests/transfers.rs @@ -1829,6 +1829,11 @@ fn revert_genesis(#[case] with_transfers: bool) { wlt.switch_to_instance(INSTANCE_3); assert_eq!(wlt.get_witness_ord(&utxo.txid), WitnessOrd::Archived); + // this should remove the utxo that is now archived but it doesn't + wlt.sync(); + let utxos = wlt.utxos(); + assert!(utxos.is_empty()); + wlt.check_allocations( contract_id, &iface_type_name, diff --git a/tests/utils/helpers.rs b/tests/utils/helpers.rs index f949a1c..56e6136 100644 --- a/tests/utils/helpers.rs +++ b/tests/utils/helpers.rs @@ -1103,6 +1103,10 @@ impl TestWallet { self.wallet.stock().contracts().unwrap().collect() } + pub fn utxos(&self) -> Vec { + self.wallet.wallet().utxos().collect() + } + pub fn debug_contracts(&self) { println!("Contracts:"); for info in self.list_contracts() { diff --git a/tests/utils/mod.rs b/tests/utils/mod.rs index 256c139..d36a9e3 100644 --- a/tests/utils/mod.rs +++ b/tests/utils/mod.rs @@ -54,7 +54,7 @@ pub use bpstd::{ }; pub use bpwallet::{ fs::FsTextStore, indexers::esplora::Client as EsploraClient, AnyIndexer, Indexer as BpIndexer, - Wallet, + Wallet, WalletUtxo, }; pub use descriptors::Wpkh; pub use electrum::{Client as ElectrumClient, ElectrumApi, Param};