Skip to content

Commit 077ea56

Browse files
committed
feat(wallet): cache txs when constructing full-scan/sync requests
1 parent fd576d6 commit 077ea56

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
@@ -2419,6 +2419,7 @@ impl Wallet {
24192419
/// start a blockchain sync with a spk based blockchain client.
24202420
pub fn start_sync_with_revealed_spks(&self) -> SyncRequest {
24212421
SyncRequest::from_chain_tip(self.chain.tip())
2422+
.cache_graph_txs(self.tx_graph())
24222423
.populate_with_revealed_spks(&self.indexed_graph.index, ..)
24232424
}
24242425

@@ -2432,6 +2433,7 @@ impl Wallet {
24322433
/// in which the list of used scripts is not known.
24332434
pub fn start_full_scan(&self) -> FullScanRequest<KeychainKind> {
24342435
FullScanRequest::from_keychain_txout_index(self.chain.tip(), &self.indexed_graph.index)
2436+
.cache_graph_txs(self.tx_graph())
24352437
}
24362438
}
24372439

0 commit comments

Comments
 (0)