decred / dcrwallet

A secure Decred wallet daemon written in Go (golang).
https://decred.org
ISC License
216 stars 155 forks source link

spv: Request headers from peer after initial sync #2316

Closed matheusd closed 9 months ago

matheusd commented 9 months ago

This modifies the peer setup procedure to request any updated headers from a newly connected peer if the connection is made after the initial sync is completed.

This speeds up re-syncing after initial sync when the local client has been offline for some time (for example, due to a flicking network connection) by ensuring any and all updated headers are requested immediately, instead of waiting until a new block is announced to begin the catchup process.