Skip to content

Commit a9e6fba

Browse files
authored
Merge pull request #383 from tvolk131/fix_incremental_scan_bug
2 parents 3ae579e + 3684f29 commit a9e6fba

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/chain/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,13 @@ impl ChainSource {
481481
}
482482

483483
if incremental_sync {
484+
let sync_request = onchain_wallet.get_incremental_sync_request();
485+
let wallet_sync_timeout_fut = tokio::time::timeout(
486+
Duration::from_secs(BDK_WALLET_SYNC_TIMEOUT_SECS),
487+
esplora_client.sync(sync_request, BDK_CLIENT_CONCURRENCY),
488+
);
489+
get_and_apply_wallet_update!(wallet_sync_timeout_fut)
490+
} else {
484491
let full_scan_request = onchain_wallet.get_full_scan_request();
485492
let wallet_sync_timeout_fut = tokio::time::timeout(
486493
Duration::from_secs(BDK_WALLET_SYNC_TIMEOUT_SECS),
@@ -491,13 +498,6 @@ impl ChainSource {
491498
),
492499
);
493500
get_and_apply_wallet_update!(wallet_sync_timeout_fut)
494-
} else {
495-
let sync_request = onchain_wallet.get_incremental_sync_request();
496-
let wallet_sync_timeout_fut = tokio::time::timeout(
497-
Duration::from_secs(BDK_WALLET_SYNC_TIMEOUT_SECS),
498-
esplora_client.sync(sync_request, BDK_CLIENT_CONCURRENCY),
499-
);
500-
get_and_apply_wallet_update!(wallet_sync_timeout_fut)
501501
}
502502
};
503503

0 commit comments

Comments
 (0)