Skip to content

Commit 868d041

Browse files
committed
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.
1 parent 4b5b263 commit 868d041

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1892,9 +1892,8 @@ bool static DisconnectTip(CValidationState &state) {
18921892
// ignore validation errors in resurrected transactions
18931893
list<CTransaction> removed;
18941894
CValidationState stateDummy;
1895-
if (!tx.IsCoinBase())
1896-
if (!AcceptToMemoryPool(mempool, stateDummy, tx, false, NULL))
1897-
mempool.remove(tx, removed, true);
1895+
if (tx.IsCoinBase() || !AcceptToMemoryPool(mempool, stateDummy, tx, false, NULL))
1896+
mempool.remove(tx, removed, true);
18981897
}
18991898
mempool.check(pcoinsTip);
19001899
// Update chainActive and related variables.

0 commit comments

Comments
 (0)