15 static const int nCheckpointSpan = 800;
23 for (
const MapCheckpoints::value_type& i :
reverse_iterate(checkpoints))
39 pindex = pindex->
pprev;
50 if(nHeight && nHeight <= pindexSync->nHeight)
CBlockIndex * pprev
pointer to the index of the predecessor of this block
std::map< int, uint256 > MapCheckpoints
reverse_range< T > reverse_iterate(T &x)
bool CheckSync(int nHeight)
Check against automatically selected checkpoint.
CBlockIndex * Tip() const
Returns the index entry for the tip of this chain, or nullptr if none.
Block-chain checkpoints are compiled-in sanity checks.
CChain chainActive
The currently-connected chain of blocks (protected by cs_main).
CBlockIndex * GetLastCheckpoint(const CCheckpointData &data)
Returns last CBlockIndex* in mapBlockIndex that is a checkpoint.
MapCheckpoints mapCheckpoints
The block chain is a tree shaped structure starting with the genesis block at the root...
int nHeight
height of the entry in the chain. The genesis block has height 0
const CBlockIndex * AutoSelectSyncCheckpoint()
Returns last CBlockIndex* from the auto selected checkpoint.