This introduces a ‘minimum chain work’ chainparam which is intended to be the known amount of work in the chain for the network at the time of software release. If you don’t have this much work, you’re not yet caught up.
This is used instead of the count of blocks test from checkpoints.
This criteria is trivial to keep updated as there is no element of subjectivity, trust, or position dependence to it. It is also a more reliable metric of sync status than a block count.
This is the first step in a larger change to eliminate checkpoints completely, but it’s independently a good idea.
This PR makes IsInitialBlockDownload no longer use header-only timestamps.
This avoids a corner case (mostly visible on testnet) where bogus headers can keep nodes in IsInitialBlockDownload.