replace mapNextTx with slimmer setSpends
This commit is contained in:
@@ -1119,7 +1119,8 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
|
||||
{
|
||||
COutPoint outpoint = txin.prevout;
|
||||
// A respend is a tx that conflicts with a member of the pool
|
||||
if (pool.mapNextTx.count(txin.prevout))
|
||||
auto itConflicting = pool.mapNextTx.find(txin.prevout);
|
||||
if (itConflicting != pool.mapNextTx.end())
|
||||
{
|
||||
fRespend = true;
|
||||
// Relay only one tx per respent outpoint, but not if tx is equivalent to pool member
|
||||
@@ -1129,7 +1130,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
|
||||
break;
|
||||
}
|
||||
/*
|
||||
const CTransaction *ptxConflicting = pool.mapNextTx[txin.prevout].ptx;
|
||||
const CTransaction *ptxConflicting = itConflicting->second;
|
||||
if (!setConflicts.count(ptxConflicting->GetHash()))
|
||||
{
|
||||
// Allow opt-out of transaction replacement by setting
|
||||
|
||||
Reference in New Issue
Block a user