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:
1 parent
e9331cd6ab
commit
cbf9b2dab1
1 file changed
+1
-1
+1
-1
@@ -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