Skip to content

Commit 9873543

Browse files
committed
chain: Request block ntfns only after initial sync
Previously, request for notifications about connected blocks were sent to the underlying dcrd instance before the chain was fully synced. This could cause a race issue if the underlying dcrd instance was also performing an initial sync, causing blocks to be connected by the blockConnected handler before the active data filter was loaded, causing transactions to be missed and the wallet's balance to be wrong, requiring a rescan to be fixed. This could happen, for example, if both the dcrd and dcrwallet processes were started at the same time or if dcrd took just enough time to connect to the network that the wallet was also initialized (for exemple, from within Decrediton). This fixes the issue by refactoring the initial sync code to only request block notifications after the initial header sync has been completed by the wallet.
1 parent 5c83e55 commit 9873543

File tree

2 files changed

+206
-171
lines changed

2 files changed

+206
-171
lines changed

0 commit comments

Comments
 (0)