]> Untitled Git - bdk/commit
Improve `txout` listing and balance APIs for redesigned structures
author志宇 <hello@evanlinjin.me>
Wed, 10 May 2023 06:14:29 +0000 (14:14 +0800)
committer志宇 <hello@evanlinjin.me>
Wed, 10 May 2023 15:57:24 +0000 (23:57 +0800)
commite01d17d59bd6177bf5e457232219669782b727b7
treefc6cb758f8d9def3c22b56b55b0d660ca90b5685
parent4963240599364c6520d0a6ecae97db77cc7b8ba8
Improve `txout` listing and balance APIs for redesigned structures

Instead of relying on a `OwnedIndexer` trait to filter for relevant
txouts, we move the listing and balance methods from `IndexedTxGraph` to
`TxGraph` and add an additional input (list of relevant outpoints) to
these methods.

This provides a simpler implementation and a more flexible API.
crates/chain/src/indexed_tx_graph.rs
crates/chain/src/keychain/txout_index.rs
crates/chain/src/spk_txout_index.rs
crates/chain/src/tx_graph.rs
crates/chain/tests/test_indexed_tx_graph.rs