Changeset View
Changeset View
Standalone View
Standalone View
src/miner.cpp
Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | if (gArgs.IsArgSet("-blockmaxsize")) { | ||||
gArgs.GetArg("-blockmaxsize", DEFAULT_MAX_GENERATED_BLOCK_SIZE); | gArgs.GetArg("-blockmaxsize", DEFAULT_MAX_GENERATED_BLOCK_SIZE); | ||||
} | } | ||||
// Limit size to between 1K and MaxBlockSize-1K for sanity: | // Limit size to between 1K and MaxBlockSize-1K for sanity: | ||||
nMaxGeneratedBlockSize = | nMaxGeneratedBlockSize = | ||||
std::max(uint64_t(1000), std::min(config.GetMaxBlockSize() - 1000, | std::max(uint64_t(1000), std::min(config.GetMaxBlockSize() - 1000, | ||||
nMaxGeneratedBlockSize)); | nMaxGeneratedBlockSize)); | ||||
// If May 15, 2018 HF is not activated yet, we also want to limit the max | |||||
// generated block size to 8MB - 1000 | |||||
if (!IsMonolithEnabled(config, pindexPrev)) { | |||||
nMaxGeneratedBlockSize = | |||||
std::min(8 * ONE_MEGABYTE - 1000, nMaxGeneratedBlockSize); | |||||
} | |||||
return nMaxGeneratedBlockSize; | return nMaxGeneratedBlockSize; | ||||
} | } | ||||
BlockAssembler::BlockAssembler(const Config &_config) : config(&_config) { | BlockAssembler::BlockAssembler(const Config &_config) : config(&_config) { | ||||
if (gArgs.IsArgSet("-blockmintxfee")) { | if (gArgs.IsArgSet("-blockmintxfee")) { | ||||
Amount n(0); | Amount n(0); | ||||
ParseMoney(gArgs.GetArg("-blockmintxfee", ""), n); | ParseMoney(gArgs.GetArg("-blockmintxfee", ""), n); | ||||
▲ Show 20 Lines • Show All 551 Lines • Show Last 20 Lines |