src/checkpoints.cpp
// Automatically select a suitable sync-checkpoint
Automatically select a suitable sync-checkpoint
Automatically select a suitable sync - checkpoint
uint256 AutoSelectSyncCheckpoint()
    {
        const CBlockIndex *pindex = pindexBest;
        while (pindex->pprev && (pindex->GetBlockTime() + nCheckpointSpan * nTargetSpacing > pindexBest->GetBlockTime() ||
               pindex->nHeight + nCheckpointSpan > pindexBest->nHeight))
            pindex = pindex->pprev;
        return pindex->GetBlockHash();
    }
uint256 AutoSelectSyncCheckpoint ( ) { const CBlockIndex * pindex = pindexBest ; while ( pindex -> pprev && ( pindex -> GetBlockTime ( ) + nCheckpointSpan * nTargetSpacing > pindexBest -> GetBlockTime ( ) || pindex -> nHeight + nCheckpointSpan > pindexBest -> nHeight ) ) pindex = pindex -> pprev ; return pindex -> GetBlockHash ( ) ; }
Automatically select a suitable sync-checkpoint
Automatically select a suitable sync - checkpoint
// Search backward for a block within max span and maturity window