mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-26 06:48:53 +02:00
[config] Remove blockmaxsize option
The blockmaxsize option was marked as deprecated in V0.15.1, and code was added to convert provided blockmaxsize into blockmaxweight. However, this code was incorrectly implemented, and blockmaxsize was silently ignored. No users have complained about blockmaxsize being ignored, so just remove it in V0.17.
This commit is contained in:
11
src/init.cpp
11
src/init.cpp
@@ -491,8 +491,6 @@ std::string HelpMessage(HelpMessageMode mode)
|
||||
strUsage += HelpMessageOpt("-whitelistrelay", strprintf(_("Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d)"), DEFAULT_WHITELISTRELAY));
|
||||
|
||||
strUsage += HelpMessageGroup(_("Block creation options:"));
|
||||
if (showDebug)
|
||||
strUsage += HelpMessageOpt("-blockmaxsize=<n>", "Set maximum BIP141 block weight to this * 4. Deprecated, use blockmaxweight");
|
||||
strUsage += HelpMessageOpt("-blockmaxweight=<n>", strprintf(_("Set maximum BIP141 block weight (default: %d)"), DEFAULT_BLOCK_MAX_WEIGHT));
|
||||
strUsage += HelpMessageOpt("-blockmintxfee=<amt>", strprintf(_("Set lowest fee rate (in %s/kB) for transactions to be included in block creation. (default: %s)"), CURRENCY_UNIT, FormatMoney(DEFAULT_BLOCK_MIN_TX_FEE)));
|
||||
if (showDebug)
|
||||
@@ -798,15 +796,6 @@ void InitParameterInteraction()
|
||||
if (gArgs.SoftSetBoolArg("-whitelistrelay", true))
|
||||
LogPrintf("%s: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1\n", __func__);
|
||||
}
|
||||
|
||||
if (gArgs.IsArgSet("-blockmaxsize")) {
|
||||
unsigned int max_size = gArgs.GetArg("-blockmaxsize", 0);
|
||||
if (gArgs.SoftSetArg("blockmaxweight", strprintf("%d", max_size * WITNESS_SCALE_FACTOR))) {
|
||||
LogPrintf("%s: parameter interaction: -blockmaxsize=%d -> setting -blockmaxweight=%d (-blockmaxsize is deprecated!)\n", __func__, max_size, max_size * WITNESS_SCALE_FACTOR);
|
||||
} else {
|
||||
LogPrintf("%s: Ignoring blockmaxsize setting which is overridden by blockmaxweight", __func__);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static std::string ResolveErrMsg(const char * const optname, const std::string& strBind)
|
||||
|
||||
@@ -68,9 +68,7 @@ BlockAssembler::BlockAssembler(const CChainParams& params, const Options& option
|
||||
static BlockAssembler::Options DefaultOptions(const CChainParams& params)
|
||||
{
|
||||
// Block resource limits
|
||||
// If neither -blockmaxsize or -blockmaxweight is given, limit to DEFAULT_BLOCK_MAX_*
|
||||
// If only one is given, only restrict the specified resource.
|
||||
// If both are given, restrict both.
|
||||
// If -blockmaxweight is not given, limit to DEFAULT_BLOCK_MAX_WEIGHT
|
||||
BlockAssembler::Options options;
|
||||
options.nBlockMaxWeight = gArgs.GetArg("-blockmaxweight", DEFAULT_BLOCK_MAX_WEIGHT);
|
||||
if (gArgs.IsArgSet("-blockmintxfee")) {
|
||||
|
||||
Reference in New Issue
Block a user