This is to track the regression introduced in master, which needs fixing for 0.14. See #9240, #9371, etc.
CCoinsViewCache& view, const CChainParams& chainparams, bool fJustCheck)
{
    AssertLockHeld(cs_main);
    int64_t nTimeStart = GetTimeMicros();
    
    if (!CheckBlock(block, state, chainparams.GetConsensus(), !fJustCheck, !fJustCheck))
        return error("%s: Consensus::CheckBlock: %s", __func__, FormatStateMessage(state));
    
    uint256 hashPrevBlock = pindex->pprev == NULL ? uint256() : pindex->pprev->GetBlockHash();
    assert(hashPrevBlock == view.GetBestBlock());
    
    
    if (block.GetHash() == chainparams.GetConsensus().hashGenesisBlock) {
        if (!fJustCheck)
            view.SetBestBlock(pindex->GetBlockHash());
        return true;
    }
    bool fScriptChecks = true;
    if (!hashAssumeValid.IsNull()) {
        
        
        
        
        
        BlockMap::const_iterator  it = mapBlockIndex.find(hashAssumeValid);