refactor: rename local gArgs to args

Avoid confusion with the global gArgs
This commit is contained in:
stickies-v 2023-01-12 11:16:17 +00:00
parent bd74004532
commit cba749a9b7
No known key found for this signature in database
GPG key ID: 5CB1CE6E5E66A757

View file

@ -74,13 +74,13 @@ BlockAssembler::BlockAssembler(Chainstate& chainstate, const CTxMemPool* mempool
nBlockMaxWeight = std::max<size_t>(4000, std::min<size_t>(MAX_BLOCK_WEIGHT - 4000, options.nBlockMaxWeight)); nBlockMaxWeight = std::max<size_t>(4000, std::min<size_t>(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 // Block resource limits
// If -blockmaxweight is not given, limit to DEFAULT_BLOCK_MAX_WEIGHT // If -blockmaxweight is not given, limit to DEFAULT_BLOCK_MAX_WEIGHT
options.nBlockMaxWeight = gArgs.GetIntArg("-blockmaxweight", DEFAULT_BLOCK_MAX_WEIGHT); options.nBlockMaxWeight = args.GetIntArg("-blockmaxweight", DEFAULT_BLOCK_MAX_WEIGHT);
if (gArgs.IsArgSet("-blockmintxfee")) { if (args.IsArgSet("-blockmintxfee")) {
std::optional<CAmount> parsed = ParseMoney(gArgs.GetArg("-blockmintxfee", "")); std::optional<CAmount> parsed = ParseMoney(args.GetArg("-blockmintxfee", ""));
options.blockMinFeeRate = CFeeRate{parsed.value_or(DEFAULT_BLOCK_MIN_TX_FEE)}; options.blockMinFeeRate = CFeeRate{parsed.value_or(DEFAULT_BLOCK_MIN_TX_FEE)};
} else { } else {
options.blockMinFeeRate = CFeeRate{DEFAULT_BLOCK_MIN_TX_FEE}; options.blockMinFeeRate = CFeeRate{DEFAULT_BLOCK_MIN_TX_FEE};