[bdk_chain_redesign] Rm unnecessary code and premature optimisation
* Remove `chain_oracle::CacheBackend` for now as it is not used. * `SparseChain` does not need to implement `ChainOracle`. * Remove filter predicate for `list..` methods of `TxGraph` and `IndexedTxGraph` as this is premature optimisation. * `Append` can be implemented for all `BTreeMap`s and `BTreeSet`s, instead of only `local_chain::ChangeSet`.
This commit is contained in:
@@ -3,7 +3,7 @@ use core::convert::Infallible;
|
||||
use alloc::collections::{BTreeMap, BTreeSet};
|
||||
use bitcoin::BlockHash;
|
||||
|
||||
use crate::{Append, BlockId, ChainOracle};
|
||||
use crate::{BlockId, ChainOracle};
|
||||
|
||||
/// This is a local implementation of [`ChainOracle`].
|
||||
///
|
||||
@@ -180,12 +180,6 @@ impl LocalChain {
|
||||
/// [`determine_changeset`]: LocalChain::determine_changeset
|
||||
pub type ChangeSet = BTreeMap<u32, Option<BlockHash>>;
|
||||
|
||||
impl Append for ChangeSet {
|
||||
fn append(&mut self, mut other: Self) {
|
||||
BTreeMap::append(self, &mut other)
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents an update failure of [`LocalChain`] due to the update not connecting to the original
|
||||
/// chain.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user