feat(chain)!: make KeychainTxOutIndex more range based

`KeychainTxOutIndex` should try and avoid "all" kind of queries.
There may be subranges of interest. If the user wants "all" they can
just query "..".
This commit is contained in:
LLFourn
2024-02-06 17:31:22 +11:00
committed by 志宇
parent ee21ffeee0
commit fac228337c
6 changed files with 94 additions and 78 deletions

View File

@@ -1015,7 +1015,7 @@ impl<D> Wallet<D> {
/// let (sent, received) = wallet.sent_and_received(tx);
/// ```
pub fn sent_and_received(&self, tx: &Transaction) -> (u64, u64) {
self.indexed_graph.index.sent_and_received(tx)
self.indexed_graph.index.sent_and_received(tx, ..)
}
/// Get a single transaction from the wallet as a [`CanonicalTx`] (if the transaction exists).