mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-22 13:40:16 +01:00
cleanup: avoid hidden copies in range-for loops
This commit is contained in:
@@ -651,7 +651,7 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
|
||||
view.SetBackend(viewMemPool);
|
||||
|
||||
// do all inputs exist?
|
||||
for (const CTxIn txin : tx.vin) {
|
||||
for (const CTxIn& txin : tx.vin) {
|
||||
if (!pcoinsTip->HaveCoinInCache(txin.prevout)) {
|
||||
coins_to_uncache.push_back(txin.prevout);
|
||||
}
|
||||
@@ -957,7 +957,7 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
|
||||
}
|
||||
|
||||
// Remove conflicting transactions from the mempool
|
||||
for (const CTxMemPool::txiter it : allConflicting)
|
||||
for (CTxMemPool::txiter it : allConflicting)
|
||||
{
|
||||
LogPrint(BCLog::MEMPOOL, "replacing tx %s with %s for %s BTC additional fees, %d delta bytes\n",
|
||||
it->GetTx().GetHash().ToString(),
|
||||
|
||||
Reference in New Issue
Block a user