mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Deprecate confusing blockmaxsize, fix getmininginfo output
* This removes block-size-limiting code in favor of GBT clients doing the limiting themselves (if at all). * -blockmaxsize is deprecated and only used to calculate an implied blockmaxweight, addressing confusion from multiple users. * getmininginfo's currentblocksize return value was returning garbage values, and has been removed, also removing a GetSerializeSize call in some block generation inner loops and potentially addressing some performance edge cases.
This commit is contained in:
parent
31e72b284e
commit
ba206d2c63
7 changed files with 13 additions and 46 deletions
11
src/init.cpp
11
src/init.cpp
|
|
@ -484,7 +484,7 @@ std::string HelpMessage(HelpMessageMode mode)
|
|||
|
||||
strUsage += HelpMessageGroup(_("Block creation options:"));
|
||||
strUsage += HelpMessageOpt("-blockmaxweight=<n>", strprintf(_("Set maximum BIP141 block weight (default: %d)"), DEFAULT_BLOCK_MAX_WEIGHT));
|
||||
strUsage += HelpMessageOpt("-blockmaxsize=<n>", strprintf(_("Set maximum block size in bytes (default: %d)"), DEFAULT_BLOCK_MAX_SIZE));
|
||||
strUsage += HelpMessageOpt("-blockmaxsize=<n>", _("Set maximum BIP141 block weight to this * 4. Deprecated, use blockmaxweight"));
|
||||
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)
|
||||
strUsage += HelpMessageOpt("-blockversion=<n>", "Override block version to test forking scenarios");
|
||||
|
|
@ -785,6 +785,15 @@ 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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue