2458 | @@ -2459,7 +2459,7 @@ bool CChainState::ConnectTip(CValidationState& state, const CChainParams& chainp
2459 | int64_t nTime5 = GetTimeMicros(); nTimeChainState += nTime5 - nTime4;
2460 | LogPrint(BCLog::BENCH, " - Writing chainstate: %.2fms [%.2fs (%.2fms/blk)]\n", (nTime5 - nTime4) * MILLI, nTimeChainState * MICRO, nTimeChainState * MILLI / nBlocksTotal);
2461 | // Remove conflicting transactions from the mempool.;
2462 | - mempool.removeForBlock(blockConnecting.vtx, pindexNew->nHeight);
2463 | + mempool.removeForBlock(blockConnecting.vtx, pindexNew->nHeight, GuessVerificationProgress(chainparams.TxData(), pindexNew) > 0.9);
We shouldn't use a function that is only used to print debug statements in validation. Couldn't you replace this with a check if (this_block_height < .9*total_header_height)?