Browse Source

Remove coinbase-dependant transactions during reorg.

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.
0.10
Matt Corallo 10 years ago
parent
commit
868d041622
  1. 5
      src/main.cpp

5
src/main.cpp

@ -1892,9 +1892,8 @@ bool static DisconnectTip(CValidationState &state) { @@ -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.

Loading…
Cancel
Save