aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2014-12-11 13:17:34 +0100
committerWladimir J. van der Laan <[email protected]>2014-12-11 15:24:00 +0100
commit41cced21063a89992ef393dda4fffc44ff60c7c3 (patch)
tree0131964c136ec4f2e69eb20c0ed63393f58cdee1 /src/main.cpp
parentqt: translations pull from transifex (diff)
parentRPC-test based on invalidateblock for mempool coinbase spends (diff)
downloaddiscoin-41cced21063a89992ef393dda4fffc44ff60c7c3.tar.xz
discoin-41cced21063a89992ef393dda4fffc44ff60c7c3.zip
Merge pull request #5267
34318d7 RPC-test based on invalidateblock for mempool coinbase spends (Gavin Andresen) 7fd6219 Make CTxMemPool::remove more effecient by avoiding recursion (Matt Corallo) b7b4318 Make CTxMemPool::check more thourough by using CheckInputs (Matt Corallo) 723d12c Remove txn which are invalidated by coinbase maturity during reorg (Matt Corallo) 868d041 Remove coinbase-dependant transactions during reorg. (Matt Corallo)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 70e3973e6..9e1c41ada 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1892,10 +1892,10 @@ 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.removeCoinbaseSpends(pcoinsTip, pindexDelete->nHeight);
mempool.check(pcoinsTip);
// Update chainActive and related variables.
UpdateTip(pindexDelete->pprev);