Changeset View
Changeset View
Standalone View
Standalone View
src/miner.cpp
Show First 20 Lines • Show All 450 Lines • ▼ Show 20 Lines | while (mi != mempool->mapTx.get<ancestor_score>().end() || | ||||
int64_t packageSigOps = iter->GetSigOpCountWithAncestors(); | int64_t packageSigOps = iter->GetSigOpCountWithAncestors(); | ||||
if (fUsingModified) { | if (fUsingModified) { | ||||
packageSize = modit->nSizeWithAncestors; | packageSize = modit->nSizeWithAncestors; | ||||
packageFees = modit->nModFeesWithAncestors; | packageFees = modit->nModFeesWithAncestors; | ||||
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 | // Don't include this package, but don't stop yet because something | ||||
return; | // else we might consider may have a sufficient fee rate (since txes | ||||
// are ordered by virtualsize feerate, not actual feerate). | |||||
if (fUsingModified) { | |||||
// Since we always look at the best entry in mapModifiedTx, we | |||||
// must erase failed entries so that we can consider the next | |||||
// best entry on the next loop iteration | |||||
mapModifiedTx.get<ancestor_score>().erase(modit); | |||||
failedTx.insert(iter); | |||||
} | |||||
continue; | |||||
} | } | ||||
// The following must not use virtual size since TestPackage relies on | // The following must not use virtual size since TestPackage relies on | ||||
// having an accurate call to | // having an accurate call to | ||||
// GetMaxBlockSigOpsCount(blockSizeWithPackage). | // 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 | ||||
▲ Show 20 Lines • Show All 95 Lines • Show Last 20 Lines |