[bdk_chain_redesign] Add apply_additions to IndexedTxGraph

* Get mutable index from `IndexedChainGraph`.
* Also add `apply_additions` method to `TxIndex` trait.
This commit is contained in:
志宇
2023-03-27 15:36:37 +08:00
parent 6cbb18d409
commit d0a2aa83be
4 changed files with 26 additions and 0 deletions

View File

@@ -101,6 +101,10 @@ impl<K: Clone + Ord + Debug + 'static> TxIndex for KeychainTxOutIndex<K> {
self.scan(tx)
}
fn apply_additions(&mut self, additions: Self::Additions) {
self.apply_additions(additions)
}
fn is_tx_relevant(&self, tx: &bitcoin::Transaction) -> bool {
self.is_relevant(tx)
}