mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Merge 6b165f5906 into merged_master (Bitcoin PR bitcoin/bitcoin#31384)
This commit is contained in:
commit
c068c05f23
11 changed files with 207 additions and 19 deletions
19
src/init.cpp
19
src/init.cpp
|
|
@ -20,6 +20,7 @@
|
|||
#include <common/args.h>
|
||||
#include <common/system.h>
|
||||
#include <consensus/amount.h>
|
||||
#include <consensus/consensus.h>
|
||||
#include <deploymentstatus.h>
|
||||
#include <hash.h>
|
||||
#include <httprpc.h>
|
||||
|
|
@ -665,6 +666,7 @@ void SetupServerArgs(ArgsManager& argsman, bool can_listen_ipc)
|
|||
|
||||
|
||||
argsman.AddArg("-blockmaxweight=<n>", strprintf("Set maximum BIP141 block weight (default: %d)", DEFAULT_BLOCK_MAX_WEIGHT), ArgsManager::ALLOW_ANY, OptionsCategory::BLOCK_CREATION);
|
||||
argsman.AddArg("-blockreservedweight=<n>", strprintf("Reserve space for the fixed-size block header plus the largest coinbase transaction the mining software may add to the block. (default: %d).", DEFAULT_BLOCK_RESERVED_WEIGHT), ArgsManager::ALLOW_ANY, OptionsCategory::BLOCK_CREATION);
|
||||
argsman.AddArg("-blockmintxfee=<amt>", strprintf("Set lowest fee rate (in %s/kvB) for transactions to be included in block creation. (default: %s)", CURRENCY_UNIT, FormatMoney(DEFAULT_BLOCK_MIN_TX_FEE)), ArgsManager::ALLOW_ANY, OptionsCategory::BLOCK_CREATION);
|
||||
argsman.AddArg("-blockversion=<n>", "Override block version to test forking scenarios", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::BLOCK_CREATION);
|
||||
|
||||
|
|
@ -1089,6 +1091,23 @@ bool AppInitParameterInteraction(const ArgsManager& args)
|
|||
}
|
||||
}
|
||||
|
||||
if (args.IsArgSet("-blockmaxweight")) {
|
||||
const auto max_block_weight = args.GetIntArg("-blockmaxweight", DEFAULT_BLOCK_MAX_WEIGHT);
|
||||
if (max_block_weight > MAX_BLOCK_WEIGHT) {
|
||||
return InitError(strprintf(_("Specified -blockmaxweight (%d) exceeds consensus maximum block weight (%d)"), max_block_weight, MAX_BLOCK_WEIGHT));
|
||||
}
|
||||
}
|
||||
|
||||
if (args.IsArgSet("-blockreservedweight")) {
|
||||
const auto block_reserved_weight = args.GetIntArg("-blockreservedweight", DEFAULT_BLOCK_RESERVED_WEIGHT);
|
||||
if (block_reserved_weight > MAX_BLOCK_WEIGHT) {
|
||||
return InitError(strprintf(_("Specified -blockreservedweight (%d) exceeds consensus maximum block weight (%d)"), block_reserved_weight, MAX_BLOCK_WEIGHT));
|
||||
}
|
||||
if (block_reserved_weight < MINIMUM_BLOCK_RESERVED_WEIGHT) {
|
||||
return InitError(strprintf(_("Specified -blockreservedweight (%d) is lower than minimum safety value of (%d)"), block_reserved_weight, MINIMUM_BLOCK_RESERVED_WEIGHT));
|
||||
}
|
||||
}
|
||||
|
||||
nBytesPerSigOp = args.GetIntArg("-bytespersigop", nBytesPerSigOp);
|
||||
|
||||
if (!g_wallet_init_interface.ParameterInteraction()) return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue