mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
mempool: codify existing assumption about duplicate txids during removal
Also explicitly check for txid equality rather than transaction equality as the former is a tighter constraint if witness data is included when comparing the full transactions. Co-authored-by: glozow <gloriajzhao@gmail.com>
This commit is contained in:
@@ -652,7 +652,7 @@ void CTxMemPool::removeConflicts(const CTransaction &tx)
|
||||
auto it = mapNextTx.find(txin.prevout);
|
||||
if (it != mapNextTx.end()) {
|
||||
const CTransaction &txConflict = *it->second;
|
||||
if (txConflict != tx)
|
||||
if (Assume(txConflict.GetHash() != tx.GetHash()))
|
||||
{
|
||||
ClearPrioritisation(txConflict.GetHash());
|
||||
removeRecursive(txConflict, MemPoolRemovalReason::CONFLICT);
|
||||
|
||||
Reference in New Issue
Block a user