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 g_chainstate.PreciousBlock(state, params, pindex);
}
bool CChainState::InvalidateBlock(CValidationState& state, const CChainParams& chainparams, CBlockIndex *pindex)
{
    AssertLockHeld(cs_main);
    
    
    
    
    
    bool pindex_was_in_chain = false;
    CBlockIndex *invalid_walk_tip = chainActive.Tip();
    DisconnectedBlockTransactions disconnectpool;
    while (chainActive.Contains(pindex)) {
        pindex_was_in_chain = true;
        
        
        if (!DisconnectTip(state, chainparams, &disconnectpool)) {
            
            
            UpdateMempoolForReorg(disconnectpool, false);
            return false;
        }
    }
    
    
    while (pindex_was_in_chain && invalid_walk_tip != pindex) {