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 authored and 志宇 committed 2024-04-18 15:31:14 +08:00
1 parent ee21ffeee0
commit fac228337c
6 files changed
+94 -78

No files matched your search

+1 -1
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).