diff --git a/src/node/miner.cpp b/src/node/miner.cpp index c2b6fd1dc32..9a6af5f936c 100644 --- a/src/node/miner.cpp +++ b/src/node/miner.cpp @@ -74,13 +74,13 @@ BlockAssembler::BlockAssembler(Chainstate& chainstate, const CTxMemPool* mempool nBlockMaxWeight = std::max(4000, std::min(MAX_BLOCK_WEIGHT - 4000, options.nBlockMaxWeight)); } -void ApplyArgsManOptions(const ArgsManager& gArgs, BlockAssembler::Options& options) +void ApplyArgsManOptions(const ArgsManager& args, BlockAssembler::Options& options) { // Block resource limits // If -blockmaxweight is not given, limit to DEFAULT_BLOCK_MAX_WEIGHT - options.nBlockMaxWeight = gArgs.GetIntArg("-blockmaxweight", DEFAULT_BLOCK_MAX_WEIGHT); - if (gArgs.IsArgSet("-blockmintxfee")) { - std::optional parsed = ParseMoney(gArgs.GetArg("-blockmintxfee", "")); + options.nBlockMaxWeight = args.GetIntArg("-blockmaxweight", DEFAULT_BLOCK_MAX_WEIGHT); + if (args.IsArgSet("-blockmintxfee")) { + std::optional parsed = ParseMoney(args.GetArg("-blockmintxfee", "")); options.blockMinFeeRate = CFeeRate{parsed.value_or(DEFAULT_BLOCK_MIN_TX_FEE)}; } else { options.blockMinFeeRate = CFeeRate{DEFAULT_BLOCK_MIN_TX_FEE};