Remove txn which are invalidated by coinbase maturity during reorg

This commit is contained in:
Matt Corallo
2014-11-11 20:57:54 -08:00
parent 868d041622
commit 723d12c098
3 changed files with 28 additions and 0 deletions

View File

@@ -1895,6 +1895,7 @@ bool static DisconnectTip(CValidationState &state) {
if (tx.IsCoinBase() || !AcceptToMemoryPool(mempool, stateDummy, tx, false, NULL))
mempool.remove(tx, removed, true);
}
mempool.removeCoinbaseSpends(pcoinsTip, pindexDelete->nHeight);
mempool.check(pcoinsTip);
// Update chainActive and related variables.
UpdateTip(pindexDelete->pprev);