Skip to content

Commit cbf9b2d

Browse files
theuniglozow
andcommitted
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 <[email protected]>
1 parent e9331cd commit cbf9b2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/txmempool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ void CTxMemPool::removeConflicts(const CTransaction &tx)
652652
auto it = mapNextTx.find(txin.prevout);
653653
if (it != mapNextTx.end()) {
654654
const CTransaction &txConflict = *it->second;
655-
if (txConflict != tx)
655+
if (Assume(txConflict.GetHash() != tx.GetHash()))
656656
{
657657
ClearPrioritisation(txConflict.GetHash());
658658
removeRecursive(txConflict, MemPoolRemovalReason::CONFLICT);

0 commit comments

Comments
 (0)