From: 志宇 Date: Wed, 1 May 2024 08:27:36 +0000 (+0800) Subject: feat(wallet): cache txs when constructing full-scan/sync requests X-Git-Tag: v1.0.0-alpha.11~1^2~8 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/struct.CommandStringError.html?a=commitdiff_plain;h=653e4fed6d16698bc5859c1e4afdcee7b3d83dad;p=bdk feat(wallet): cache txs when constructing full-scan/sync requests --- diff --git a/crates/bdk/src/wallet/mod.rs b/crates/bdk/src/wallet/mod.rs index 4074c431..146d4677 100644 --- a/crates/bdk/src/wallet/mod.rs +++ b/crates/bdk/src/wallet/mod.rs @@ -2565,6 +2565,7 @@ impl Wallet { /// start a blockchain sync with a spk based blockchain client. pub fn start_sync_with_revealed_spks(&self) -> SyncRequest { SyncRequest::from_chain_tip(self.chain.tip()) + .cache_graph_txs(self.tx_graph()) .populate_with_revealed_spks(&self.indexed_graph.index, ..) } @@ -2578,6 +2579,7 @@ impl Wallet { /// in which the list of used scripts is not known. pub fn start_full_scan(&self) -> FullScanRequest { FullScanRequest::from_keychain_txout_index(self.chain.tip(), &self.indexed_graph.index) + .cache_graph_txs(self.tx_graph()) } }