Skip to content

Commit

Permalink
Remove coinbase-dependant transactions during reorg.
Browse files Browse the repository at this point in the history
This still leaves transactions in mempool that are potentially
invalid if the maturity period has been reorged out of, but at
least they're not missing inputs entirely.
  • Loading branch information
TheBlueMatt committed Dec 8, 2014
1 parent 4b5b263 commit 868d041
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main.cpp
Expand Up @@ -1892,9 +1892,8 @@ bool static DisconnectTip(CValidationState &state) {
// ignore validation errors in resurrected transactions
list<CTransaction> removed;
CValidationState stateDummy;
if (!tx.IsCoinBase())
if (!AcceptToMemoryPool(mempool, stateDummy, tx, false, NULL))
mempool.remove(tx, removed, true);
if (tx.IsCoinBase() || !AcceptToMemoryPool(mempool, stateDummy, tx, false, NULL))
mempool.remove(tx, removed, true);
}
mempool.check(pcoinsTip);
// Update chainActive and related variables.
Expand Down

0 comments on commit 868d041

Please sign in to comment.