[bdk_chain_redesign] Various tweaks and fixes

The `ConfirmationHeight` trait has been removed in favour of a second
method on the `Anchor` trait: `confirmation_height_upper_bound()`.

Methods `try_balance_at()` and `balance_at()` of `IndexedTxGraph` have
been removed as they do not provide additional functionality.

`IndexedTxGraph::insert_relevant_txs` now uses two loops, the first loop
indexes all transactions first. This is done as some indexes require
ancestor transactions to be indexed first and we cannot guarantee that
the input transactions are in topological order.
This commit is contained in:
志宇
2023-04-21 13:29:44 +08:00
parent 03c128311a
commit f3e7b67bf1
5 changed files with 53 additions and 75 deletions

View File

@@ -908,7 +908,7 @@ impl<A: Anchor> TxGraph<A> {
)
)]
#[must_use]
pub struct Additions<A> {
pub struct Additions<A = ()> {
pub tx: BTreeSet<Transaction>,
pub txout: BTreeMap<OutPoint, TxOut>,
pub anchors: BTreeSet<(A, Txid)>,