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) {`)
bool Condition(const CBlockIndex* pindex, const Consensus::Params& params) const override
    {
        return ((pindex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) &&
               ((pindex->nVersion >> bit) & 1) != 0 &&
               ((ComputeBlockVersion(pindex->pprev, params) >> bit) & 1) == 0;
    }
};
static ThresholdConditionCache warningcache[VERSIONBITS_NUM_BITS];
static bool IsScriptWitnessEnabled(const Consensus::Params& params)
{
    return params.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout != 0;
}
static unsigned int GetBlockScriptFlags(const CBlockIndex* pindex, const Consensus::Params& consensusparams) {
    AssertLockHeld(cs_main);
    unsigned int flags = SCRIPT_VERIFY_NONE;
    
    
    
    
    
    if (consensusparams.BIP16Exception.IsNull() || 
        pindex->phashBlock == nullptr || 
        *pindex->phashBlock != consensusparams.BIP16Exception) 
    {
        flags |= SCRIPT_VERIFY_P2SH;
    }
    
    
    if (flags & SCRIPT_VERIFY_P2SH && IsScriptWitnessEnabled(consensusparams)) {
        flags |= SCRIPT_VERIFY_WITNESS;