mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
refactor: rename local gArgs to args
Avoid confusion with the global gArgs
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
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<CAmount> parsed = ParseMoney(gArgs.GetArg("-blockmintxfee", ""));
|
||||
options.nBlockMaxWeight = args.GetIntArg("-blockmaxweight", DEFAULT_BLOCK_MAX_WEIGHT);
|
||||
if (args.IsArgSet("-blockmintxfee")) {
|
||||
std::optional<CAmount> 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};
|
||||
|
||||
Reference in New Issue
Block a user