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; | |||||
deadalnix: You need to split this in another patch so that the rest of the code doesn't get blocked by it. | |||||
markblundebergAuthorUnsubmitted Done Inline ActionsTry building this without the change and run tests and observe why it matters. markblundeberg: Try building this without the change and run tests and observe why it matters. | |||||
} | } | ||||
// 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 |
You need to split this in another patch so that the rest of the code doesn't get blocked by it.
IMO this is the wrong tradeof. The only txns for which it makes a difference are the one very rich in sigops, and in the case of a reorg where someone mined them, so that same one will likely mine them again later on anyways.
Regardless we should be continuing this discussion in another patch if you want to pursue this, it does not make sense to bundle this together with the rest and it is just delaying everything.