diff options
| author | Matt Corallo <[email protected]> | 2014-11-11 16:41:44 -0800 |
|---|---|---|
| committer | Matt Corallo <[email protected]> | 2014-12-08 14:05:42 -0800 |
| commit | 868d041622e2f589ab4535c30ce683534b6d4f71 (patch) | |
| tree | bb46d3a10c60d9601fb38ed9d8f587aab1ee1327 /src/main.cpp | |
| parent | Merge pull request #5434 (diff) | |
| download | discoin-868d041622e2f589ab4535c30ce683534b6d4f71.tar.xz discoin-868d041622e2f589ab4535c30ce683534b6d4f71.zip | |
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.
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 70e3973e6..3a2c167e8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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. |