[bdk_chain_redesign] Introduce ChainOracle and TxIndex traits
The chain oracle keeps track of the best chain, while the transaction index indexes transaction data in relation to script pubkeys. This commit also includes initial work on `IndexedTxGraph`.
This commit is contained in:
@@ -19,7 +19,7 @@ use crate::{
|
||||
collections::BTreeMap,
|
||||
sparse_chain::ChainPosition,
|
||||
tx_graph::TxGraph,
|
||||
ForEachTxOut,
|
||||
ForEachTxOut, TxIndexAdditions,
|
||||
};
|
||||
|
||||
#[cfg(feature = "miniscript")]
|
||||
@@ -85,6 +85,12 @@ impl<K: Ord> DerivationAdditions<K> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<K: Ord> TxIndexAdditions for DerivationAdditions<K> {
|
||||
fn append_additions(&mut self, other: Self) {
|
||||
self.append(other)
|
||||
}
|
||||
}
|
||||
|
||||
impl<K> Default for DerivationAdditions<K> {
|
||||
fn default() -> Self {
|
||||
Self(Default::default())
|
||||
|
||||
Reference in New Issue
Block a user