During rolling forward in `ReplayBlocks()` the UI progress starts with 0 then, once sync up again, jumps to 100%. This process can take pretty long and it would be good to show some progress steps within the RollingForwardBlock loop (`for (int nHeight = nForkHeight + 1; nHeight <= pindexNew->nHeight; ++nHeight) {`)
return OpenDiskFile(pos, "blk", fReadOnly);
}
static FILE* OpenUndoFile(const CDiskBlockPos &pos, bool fReadOnly) {
    return OpenDiskFile(pos, "rev", fReadOnly);
}
fs::path GetBlockPosFilename(const CDiskBlockPos &pos, const char *prefix)
{
    return GetBlocksDir() / strprintf("%s%05u.dat", prefix, pos.nFile);
}
CBlockIndex * CChainState::InsertBlockIndex(const uint256& hash)
{
    AssertLockHeld(cs_main);
    if (hash.IsNull())
        return nullptr;
    
    BlockMap::iterator mi = mapBlockIndex.find(hash);
    if (mi != mapBlockIndex.end())
        return (*mi).second;
    
    CBlockIndex* pindexNew = new CBlockIndex();
    mi = mapBlockIndex.insert(std::make_pair(hash, pindexNew)).first;
    pindexNew->phashBlock = &((*mi).first);
    return pindexNew;
}
bool CChainState::LoadBlockIndex(const Consensus::Params& consensus_params, CBlockTreeDB& blocktree)