Keep mempool consistent after conflicting withdraw-spent

This commit is contained in:
Matt Corallo 2016-03-18 21:24:04 -07:00 committed by Gregory Sanders
parent bde5c0a819
commit eebbfb84b6
5 changed files with 25 additions and 11 deletions

View file

@ -2347,7 +2347,7 @@ bool static ConnectTip(CValidationState& state, const CChainParams& chainparams,
int64_t nTime5 = GetTimeMicros(); nTimeChainState += nTime5 - nTime4;
LogPrint("bench", " - Writing chainstate: %.2fms [%.2fs]\n", (nTime5 - nTime4) * 0.001, nTimeChainState * 0.000001);
// Remove conflicting transactions from the mempool.;
mempool.removeForBlock(blockConnecting.vtx, pindexNew->nHeight);
mempool.removeForBlock(blockConnecting.vtx, pindexNew->nHeight, setWithdrawsSpent);
// Update chainActive & related variables.
UpdateTip(pindexNew, chainparams);