diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2016-12-09 16:22:33 -0800 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2016-12-09 16:31:03 -0800 |
commit | a1dcf2e1087beaf3981739fd2bb74f35ecad630a (patch) | |
tree | be820fbce936690f57383d2a2329a1b8ccf7d860 /src/validation.cpp | |
parent | d38b0d7a6b6056cba26999b702815775e2437d87 (diff) | |
parent | a874ab5ccf7839edb445830f81591fa608d85fa6 (diff) |
Merge #9240: Remove txConflicted
a874ab5 remove internal tracking of mempool conflicts for reporting to wallet (Alex Morcos)
bf663f8 remove external usage of mempool conflict tracking (Alex Morcos)
Diffstat (limited to 'src/validation.cpp')
-rw-r--r-- | src/validation.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index c1efa8bc17..7163b99a67 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2145,11 +2145,10 @@ static int64_t nTimeChainState = 0; static int64_t nTimePostConnect = 0; /** - * Used to track conflicted transactions removed from mempool and transactions - * applied to the UTXO state as a part of a single ActivateBestChainStep call. + * Used to track blocks whose transactions were applied to the UTXO state as a + * part of a single ActivateBestChainStep call. */ struct ConnectTrace { - std::vector<CTransactionRef> txConflicted; std::vector<std::pair<CBlockIndex*, std::shared_ptr<const CBlock> > > blocksConnected; }; @@ -2200,7 +2199,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(blockConnecting.vtx, pindexNew->nHeight, &connectTrace.txConflicted, !IsInitialBlockDownload()); + mempool.removeForBlock(blockConnecting.vtx, pindexNew->nHeight, !IsInitialBlockDownload()); // Update chainActive & related variables. UpdateTip(pindexNew, chainparams); @@ -2425,11 +2424,6 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams, // throw all transactions though the signal-interface // while _not_ holding the cs_main lock - for (const auto& tx : connectTrace.txConflicted) - { - GetMainSignals().SyncTransaction(*tx, pindexNewTip, CMainSignals::SYNC_TRANSACTION_NOT_IN_BLOCK); - } - // ... and about transactions that got confirmed: for (const auto& pair : connectTrace.blocksConnected) { assert(pair.second); const CBlock& block = *(pair.second); |