forked from decred/dcrwallet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chain: Fetch missing blocks one by one after initial getheaders
This introduces an additional mode for fetching headers in RPC mode when a few headers are missing after the initial sync process has completed. In this mode, headers are fetched and rescanned on dcrd's side one by one before being handed over the the standard blockConnected handler. This is meant to fix an issue when loading wallets with a very large number of used addresses on slow computers or VMs. In this situation, it may happen that the LoadActiveDataFilter call takes so long to be processed (in the order of several minutes) that a new block is found but its notification is missed (due to the wallet not yet having subscribed to block notifications). This would trigger a (new) full initial sync to be performed, with a subsequent full address reload, potentially getting the wallet into an infinite startup loop. This problem is particularly likely to be triggered in voting testnet wallets.
- Loading branch information
Showing
1 changed file
with
65 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters