[bdk_chain_redesign] Added methods to LocalChain
Also made the `IndexedTxGraph::index` field public (`index()` and `index_mut()` methods are no longer needed).
This commit is contained in:
@@ -58,8 +58,9 @@ impl<A: BlockAnchor, IA: AddAssign> AddAssign for IndexedAdditions<A, IA> {
|
||||
}
|
||||
|
||||
pub struct IndexedTxGraph<A, I> {
|
||||
/// Transaction index.
|
||||
pub index: I,
|
||||
graph: TxGraph<A>,
|
||||
index: I, // [TODO] Make public
|
||||
last_height: u32,
|
||||
}
|
||||
|
||||
@@ -79,16 +80,6 @@ impl<A: BlockAnchor, I: TxIndex> IndexedTxGraph<A, I> {
|
||||
&self.graph
|
||||
}
|
||||
|
||||
/// Get a reference of the internal transaction index.
|
||||
pub fn index(&self) -> &I {
|
||||
&self.index
|
||||
}
|
||||
|
||||
/// Get a mutable reference to the internal transaction index.
|
||||
pub fn index_mut(&mut self) -> &mut I {
|
||||
&mut self.index
|
||||
}
|
||||
|
||||
/// Applies the [`IndexedAdditions`] to the [`IndexedTxGraph`].
|
||||
pub fn apply_additions(&mut self, additions: IndexedAdditions<A, I::Additions>) {
|
||||
let IndexedAdditions {
|
||||
|
||||
Reference in New Issue
Block a user