Changeset View
Changeset View
Standalone View
Standalone View
src/miner.cpp
Show First 20 Lines • Show All 260 Lines • ▼ Show 20 Lines | for (CTxMemPool::setEntries::iterator iit = testSet.begin(); | ||||
if (inBlock.count(*iit)) { | if (inBlock.count(*iit)) { | ||||
testSet.erase(iit++); | testSet.erase(iit++); | ||||
} else { | } else { | ||||
iit++; | iit++; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
bool BlockAssembler::TestPackage(uint64_t packageSize, int64_t packageSigOps) { | bool BlockAssembler::TestPackage(uint64_t packageSize, | ||||
int64_t packageSigOps) const { | |||||
auto blockSizeWithPackage = nBlockSize + packageSize; | auto blockSizeWithPackage = nBlockSize + packageSize; | ||||
if (blockSizeWithPackage >= nMaxGeneratedBlockSize) { | if (blockSizeWithPackage >= nMaxGeneratedBlockSize) { | ||||
return false; | return false; | ||||
} | } | ||||
if (nBlockSigOps + packageSigOps >= | if (nBlockSigOps + packageSigOps >= | ||||
GetMaxBlockSigOpsCount(blockSizeWithPackage)) { | GetMaxBlockSigOpsCount(blockSizeWithPackage)) { | ||||
return false; | return false; | ||||
▲ Show 20 Lines • Show All 436 Lines • Show Last 20 Lines |