Revert "mapNextTx: use pointer as key, simplify value"

This reverts commit 52680318bb.
This commit is contained in:
lateminer
2018-01-13 02:44:28 +03:00
parent 87ea7318b3
commit c946ec9d9e
6 changed files with 41 additions and 96 deletions

View File

@@ -1119,8 +1119,7 @@ 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
auto itConflicting = pool.mapNextTx.find(txin.prevout);
if (itConflicting != pool.mapNextTx.end())
if (pool.mapNextTx.count(txin.prevout))
{
fRespend = true;
// Relay only one tx per respent outpoint, but not if tx is equivalent to pool member
@@ -1130,7 +1129,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const C
break;
}
/*
const CTransaction *ptxConflicting = itConflicting->second;
const CTransaction *ptxConflicting = pool.mapNextTx[txin.prevout].ptx;
if (!setConflicts.count(ptxConflicting->GetHash()))
{
// Allow opt-out of transaction replacement by setting