feat(tx_graph): Add method txs_with_no_anchor_or_last_seen
This commit is contained in:
@@ -27,7 +27,7 @@ use bdk_chain::{
|
||||
self, ApplyHeaderError, CannotConnectError, CheckPoint, CheckPointIter, LocalChain,
|
||||
},
|
||||
spk_client::{FullScanRequest, FullScanResult, SyncRequest, SyncResult},
|
||||
tx_graph::{CanonicalTx, TxGraph},
|
||||
tx_graph::{CanonicalTx, TxGraph, TxNode},
|
||||
Append, BlockId, ChainPosition, ConfirmationTime, ConfirmationTimeHeightAnchor, FullTxOut,
|
||||
Indexed, IndexedTxGraph,
|
||||
};
|
||||
@@ -2250,6 +2250,14 @@ impl Wallet {
|
||||
self.indexed_graph.graph()
|
||||
}
|
||||
|
||||
/// Iterate over transactions in the wallet that are unseen and unanchored likely
|
||||
/// because they haven't been broadcast.
|
||||
pub fn unbroadcast_transactions(
|
||||
&self,
|
||||
) -> impl Iterator<Item = TxNode<'_, Arc<Transaction>, ConfirmationTimeHeightAnchor>> {
|
||||
self.tx_graph().txs_with_no_anchor_or_last_seen()
|
||||
}
|
||||
|
||||
/// Get a reference to the inner [`KeychainTxOutIndex`].
|
||||
pub fn spk_index(&self) -> &KeychainTxOutIndex<KeychainKind> {
|
||||
&self.indexed_graph.index
|
||||
|
||||
Reference in New Issue
Block a user