Skip to content

Commit 653e4fe

Browse files
committed
feat(wallet): cache txs when constructing full-scan/sync requests
1 parent 58f27b3 commit 653e4fe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/bdk/src/wallet/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2565,6 +2565,7 @@ impl Wallet {
25652565
/// start a blockchain sync with a spk based blockchain client.
25662566
pub fn start_sync_with_revealed_spks(&self) -> SyncRequest {
25672567
SyncRequest::from_chain_tip(self.chain.tip())
2568+
.cache_graph_txs(self.tx_graph())
25682569
.populate_with_revealed_spks(&self.indexed_graph.index, ..)
25692570
}
25702571

@@ -2578,6 +2579,7 @@ impl Wallet {
25782579
/// in which the list of used scripts is not known.
25792580
pub fn start_full_scan(&self) -> FullScanRequest<KeychainKind> {
25802581
FullScanRequest::from_keychain_txout_index(self.chain.tip(), &self.indexed_graph.index)
2582+
.cache_graph_txs(self.tx_graph())
25812583
}
25822584
}
25832585

0 commit comments

Comments
 (0)