triggers headers download on connection with another network node
jumpstart headers sync #6228
pull pstratem wants to merge 1 commits into bitcoin:master from pstratem:jumpstart_sync changing 1 files +4 −0-
pstratem commented at 11:20 PM on June 3, 2015: contributor
-
jumpstart headers sync abcb7a81b6
-
sdaftuar commented at 11:57 PM on June 3, 2015: member
Not sure I entirely understand the goal here -- after #5662, we are now going to be sending getheaders to all network nodes, just not immediately. Instead, we wait until our headers chain is almost current (
pindexBestHeader->GetBlockTime() > GetAdjustedTime() - 24 * 60 * 60), and then we send getheaders to all our network peers.My understanding is that we do this so that we're not downloading the full headers chain from multiple peers unnecessarily. There is a tradeoff there, but I think even if we are to consider a different tradeoff and be more willing to download duplicate data, then the right way to do it would involve changing the code in SendMessages (around line 4955).
-
pstratem commented at 12:13 AM on June 4, 2015: contributor
The intent is to download headers from all peers which claim to be able to.
The selection of the first peer can get you stuck until the next block is found.
You're right about the placement of the code though.
-
pstratem commented at 12:15 AM on June 4, 2015: contributor
and im using the wrong flag!
-
pstratem commented at 12:18 AM on June 4, 2015: contributor
i'll get back to this later...
- pstratem closed this on Jun 4, 2015
- MarcoFalke locked this on Sep 8, 2021