mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
init: fail to start when -blockmaxweight exceeds MAX_BLOCK_WEIGHT
This commit is contained in:
parent
5bb31633cc
commit
c8acd4032d
2 changed files with 14 additions and 0 deletions
|
|
@ -1016,6 +1016,13 @@ 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));
|
||||
}
|
||||
}
|
||||
|
||||
nBytesPerSigOp = args.GetIntArg("-bytespersigop", nBytesPerSigOp);
|
||||
|
||||
if (!g_wallet_init_interface.ParameterInteraction()) return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue