[bdk_chain_redesign] Implement OwnedIndexer for indexers
`SpkTxOutIndex` and `KeychainTxOutIndex` now both implement `OwnedIndexer`.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
collections::*,
|
||||
indexed_tx_graph::Indexer,
|
||||
indexed_tx_graph::{Indexer, OwnedIndexer},
|
||||
miniscript::{Descriptor, DescriptorPublicKey},
|
||||
ForEachTxOut, SpkTxOutIndex,
|
||||
};
|
||||
@@ -111,6 +111,12 @@ impl<K: Clone + Ord + Debug + 'static> Indexer for KeychainTxOutIndex<K> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<K: Clone + Ord + Debug + 'static> OwnedIndexer for KeychainTxOutIndex<K> {
|
||||
fn is_spk_owned(&self, spk: &Script) -> bool {
|
||||
self.inner().is_spk_owned(spk)
|
||||
}
|
||||
}
|
||||
|
||||
impl<K: Clone + Ord + Debug> KeychainTxOutIndex<K> {
|
||||
/// Scans an object for relevant outpoints, which are stored and indexed internally.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user