aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2019-11-11 10:46:09 -0500
committerJohn Newbery <john@johnnewbery.com>2020-03-11 18:38:33 -0400
commit5613f9842b4000fed088b8cf7b99674c328d15e1 (patch)
treea082607b73b76eaf8ef415f906f466777f5eff39 /src
parentcdb893443cc16edf974f099b8485e04b3db1b1d7 (diff)
[validation] Remove conflictedTxs from PerBlockConnectTrace
Since we don't add a vtxConflicted vector to BlockConnected the conflictedTxs member of PerBlockConnectTrace is no longer used.
Diffstat (limited to 'src')
-rw-r--r--src/validation.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index 3f6f358092..c5318293bc 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -2505,22 +2505,12 @@ static int64_t nTimePostConnect = 0;
struct PerBlockConnectTrace {
CBlockIndex* pindex = nullptr;
std::shared_ptr<const CBlock> pblock;
- std::shared_ptr<std::vector<CTransactionRef>> conflictedTxs;
- PerBlockConnectTrace() : conflictedTxs(std::make_shared<std::vector<CTransactionRef>>()) {}
+ PerBlockConnectTrace() {}
};
/**
* Used to track blocks whose transactions were applied to the UTXO state as a
* part of a single ActivateBestChainStep call.
*
- * This class also tracks transactions that are removed from the mempool as
- * conflicts (per block) and can be used to pass all those transactions
- * through SyncTransaction.
- *
- * This class assumes (and asserts) that the conflicted transactions for a given
- * block are added via mempool callbacks prior to the BlockConnected() associated
- * with those transactions. If any transactions are marked conflicted, it is
- * assumed that an associated block will always be added.
- *
* This class is single-use, once you call GetBlocksConnected() you have to throw
* it away and make a new one.
*/
@@ -2551,16 +2541,12 @@ public:
// one waiting for the transactions from the next block. We pop
// the last entry here to make sure the list we return is sane.
assert(!blocksConnected.back().pindex);
- assert(blocksConnected.back().conflictedTxs->empty());
blocksConnected.pop_back();
return blocksConnected;
}
void NotifyEntryRemoved(CTransactionRef txRemoved, MemPoolRemovalReason reason) {
assert(!blocksConnected.back().pindex);
- if (reason == MemPoolRemovalReason::CONFLICT) {
- blocksConnected.back().conflictedTxs->emplace_back(std::move(txRemoved));
- }
}
};