diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2016-08-15 13:10:57 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2016-10-21 19:22:43 -0700 |
commit | 51f278329d43398428d60f5986f8d29a2041d28d (patch) | |
tree | bed01adf0a9ef92f90711dc08ca05934c582da6f /src/main.cpp | |
parent | f48211b700d171f7bcee7d3088269fdaaf1b5c13 (diff) |
Make removed and conflicted arguments optional to remove
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 df4f5e3959..a60e47504f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2768,10 +2768,9 @@ bool static DisconnectTip(CValidationState& state, const CChainParams& chainpara std::vector<uint256> vHashUpdate; BOOST_FOREACH(const CTransaction &tx, block.vtx) { // ignore validation errors in resurrected transactions - list<CTransaction> removed; CValidationState stateDummy; if (tx.IsCoinBase() || !AcceptToMemoryPool(mempool, stateDummy, tx, false, NULL, true)) { - mempool.removeRecursive(tx, removed); + mempool.removeRecursive(tx); } else if (mempool.exists(tx.GetHash())) { vHashUpdate.push_back(tx.GetHash()); } @@ -2840,7 +2839,7 @@ bool static ConnectTip(CValidationState& state, const CChainParams& chainparams, int64_t nTime5 = GetTimeMicros(); nTimeChainState += nTime5 - nTime4; LogPrint("bench", " - Writing chainstate: %.2fms [%.2fs]\n", (nTime5 - nTime4) * 0.001, nTimeChainState * 0.000001); // Remove conflicting transactions from the mempool.; - mempool.removeForBlock(pblock->vtx, pindexNew->nHeight, txConflicted, !IsInitialBlockDownload()); + mempool.removeForBlock(pblock->vtx, pindexNew->nHeight, &txConflicted, !IsInitialBlockDownload()); // Update chainActive & related variables. UpdateTip(pindexNew, chainparams); |