Changeset View
Changeset View
Standalone View
Standalone View
src/miner.cpp
Show First 20 Lines • Show All 316 Lines • ▼ Show 20 Lines | for (CTxMemPool::txiter it : alreadyAdded) { | ||||
continue; | continue; | ||||
} | } | ||||
++nDescendantsUpdated; | ++nDescendantsUpdated; | ||||
modtxiter mit = mapModifiedTx.find(desc); | modtxiter mit = mapModifiedTx.find(desc); | ||||
if (mit == mapModifiedTx.end()) { | if (mit == mapModifiedTx.end()) { | ||||
CTxMemPoolModifiedEntry modEntry(desc); | CTxMemPoolModifiedEntry modEntry(desc); | ||||
modEntry.nSizeWithAncestors -= it->GetTxSize(); | modEntry.nSizeWithAncestors -= it->GetTxSize(); | ||||
modEntry.nVirtualSizeWithAncestors -= it->GetTxVirtualSize(); | |||||
modEntry.nModFeesWithAncestors -= it->GetModifiedFee(); | modEntry.nModFeesWithAncestors -= it->GetModifiedFee(); | ||||
modEntry.nSigOpCountWithAncestors -= it->GetSigOpCount(); | modEntry.nSigOpCountWithAncestors -= it->GetSigOpCount(); | ||||
mapModifiedTx.insert(modEntry); | mapModifiedTx.insert(modEntry); | ||||
} else { | } else { | ||||
mapModifiedTx.modify(mit, update_for_parent_inclusion(it)); | mapModifiedTx.modify(mit, update_for_parent_inclusion(it)); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 117 Lines • ▼ Show 20 Lines | while (mi != mempool->mapTx.get<ancestor_score>().end() || | ||||
packageSigOps = modit->nSigOpCountWithAncestors; | packageSigOps = modit->nSigOpCountWithAncestors; | ||||
} | } | ||||
if (packageFees < blockMinFeeRate.GetFee(packageSize)) { | if (packageFees < blockMinFeeRate.GetFee(packageSize)) { | ||||
// Everything else we might consider has a lower fee rate | // Everything else we might consider has a lower fee rate | ||||
return; | return; | ||||
} | } | ||||
// The following must not use virtual size since TestPackage relies on | |||||
// having an accurate call to | |||||
// GetMaxBlockSigOpsCount(blockSizeWithPackage). | |||||
if (!TestPackage(packageSize, packageSigOps)) { | if (!TestPackage(packageSize, packageSigOps)) { | ||||
if (fUsingModified) { | if (fUsingModified) { | ||||
// Since we always look at the best entry in mapModifiedTx, we | // Since we always look at the best entry in mapModifiedTx, we | ||||
// must erase failed entries so that we can consider the next | // must erase failed entries so that we can consider the next | ||||
// best entry on the next loop iteration | // best entry on the next loop iteration | ||||
mapModifiedTx.get<ancestor_score>().erase(modit); | mapModifiedTx.get<ancestor_score>().erase(modit); | ||||
failedTx.insert(iter); | failedTx.insert(iter); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |