mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
Merge #7997: replace mapNextTx with slimmer setSpends
9805f4a mapNextTx: use pointer as key, simplify value (Kaz Wesley)
This commit is contained in:
@@ -1054,9 +1054,10 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
|
||||
LOCK(pool.cs); // protect pool.mapNextTx
|
||||
BOOST_FOREACH(const CTxIn &txin, tx.vin)
|
||||
{
|
||||
if (pool.mapNextTx.count(txin.prevout))
|
||||
auto itConflicting = pool.mapNextTx.find(txin.prevout);
|
||||
if (itConflicting != pool.mapNextTx.end())
|
||||
{
|
||||
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