Skip to content

Commit 5613f98

Browse files
committed
[validation] Remove conflictedTxs from PerBlockConnectTrace
Since we don't add a vtxConflicted vector to BlockConnected the conflictedTxs member of PerBlockConnectTrace is no longer used.
1 parent cdb8934 commit 5613f98

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

src/validation.cpp

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2505,22 +2505,12 @@ static int64_t nTimePostConnect = 0;
25052505
struct PerBlockConnectTrace {
25062506
CBlockIndex* pindex = nullptr;
25072507
std::shared_ptr<const CBlock> pblock;
2508-
std::shared_ptr<std::vector<CTransactionRef>> conflictedTxs;
2509-
PerBlockConnectTrace() : conflictedTxs(std::make_shared<std::vector<CTransactionRef>>()) {}
2508+
PerBlockConnectTrace() {}
25102509
};
25112510
/**
25122511
* Used to track blocks whose transactions were applied to the UTXO state as a
25132512
* part of a single ActivateBestChainStep call.
25142513
*
2515-
* This class also tracks transactions that are removed from the mempool as
2516-
* conflicts (per block) and can be used to pass all those transactions
2517-
* through SyncTransaction.
2518-
*
2519-
* This class assumes (and asserts) that the conflicted transactions for a given
2520-
* block are added via mempool callbacks prior to the BlockConnected() associated
2521-
* with those transactions. If any transactions are marked conflicted, it is
2522-
* assumed that an associated block will always be added.
2523-
*
25242514
* This class is single-use, once you call GetBlocksConnected() you have to throw
25252515
* it away and make a new one.
25262516
*/
@@ -2551,16 +2541,12 @@ class ConnectTrace {
25512541
// one waiting for the transactions from the next block. We pop
25522542
// the last entry here to make sure the list we return is sane.
25532543
assert(!blocksConnected.back().pindex);
2554-
assert(blocksConnected.back().conflictedTxs->empty());
25552544
blocksConnected.pop_back();
25562545
return blocksConnected;
25572546
}
25582547

25592548
void NotifyEntryRemoved(CTransactionRef txRemoved, MemPoolRemovalReason reason) {
25602549
assert(!blocksConnected.back().pindex);
2561-
if (reason == MemPoolRemovalReason::CONFLICT) {
2562-
blocksConnected.back().conflictedTxs->emplace_back(std::move(txRemoved));
2563-
}
25642550
}
25652551
};
25662552

0 commit comments

Comments
 (0)