Have removeForBlock boot transactions when required

This commit is contained in:
Gregory Sanders 2019-05-31 13:45:38 -04:00
parent 0cfe03bec4
commit 2eded09b6a
2 changed files with 39 additions and 5 deletions

View file

@ -2652,10 +2652,9 @@ bool CChainState::ConnectTip(CValidationState& state, const CChainParams& chainp
int64_t nTime5 = GetTimeMicros(); nTimeChainState += nTime5 - nTime4;
LogPrint(BCLog::BENCH, " - Writing chainstate: %.2fms [%.2fs (%.2fms/blk)]\n", (nTime5 - nTime4) * MILLI, nTimeChainState * MICRO, nTimeChainState * MILLI / nBlocksTotal);
// Remove conflicting transactions from the mempool.;
// ELEMENTS: We also eject now-invalid peg-outs based on block transition if not config list set
// If config is set, this means all peg-outs have been filtered for that list already and other
// functionaries aren't matching your list. Operator should restart with no list or new matching list.
mempool.removeForBlock(blockConnecting.vtx, pindexNew->nHeight, (paklist && !g_paklist_config));
// ELEMENTS: We also eject peg-outs with now-invalid PAK proofs
// as well as peg-in inputs during transitional periods.
mempool.removeForBlock(blockConnecting.vtx, pindexNew->nHeight, pindexNew);
disconnectpool.removeForBlock(blockConnecting.vtx);
// Update chainActive & related variables.
chainActive.SetTip(pindexNew);