mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
cleanup: avoid hidden copies in range-for loops
This commit is contained in:
@@ -209,7 +209,7 @@ bool BlockAssembler::TestPackage(uint64_t packageSize, int64_t packageSigOpsCost
|
||||
// segwit activation)
|
||||
bool BlockAssembler::TestPackageTransactions(const CTxMemPool::setEntries& package)
|
||||
{
|
||||
for (const CTxMemPool::txiter it : package) {
|
||||
for (CTxMemPool::txiter it : package) {
|
||||
if (!IsFinalTx(it->GetTx(), nHeight, nLockTimeCutoff))
|
||||
return false;
|
||||
if (!fIncludeWitness && it->GetTx().HasWitness())
|
||||
@@ -241,7 +241,7 @@ int BlockAssembler::UpdatePackagesForAdded(const CTxMemPool::setEntries& already
|
||||
indexed_modified_transaction_set &mapModifiedTx)
|
||||
{
|
||||
int nDescendantsUpdated = 0;
|
||||
for (const CTxMemPool::txiter it : alreadyAdded) {
|
||||
for (CTxMemPool::txiter it : alreadyAdded) {
|
||||
CTxMemPool::setEntries descendants;
|
||||
mempool.CalculateDescendants(it, descendants);
|
||||
// Insert all descendants (not yet in block) into the modified set
|
||||
|
||||
Reference in New Issue
Block a user