69 | @@ -70,9 +70,8 @@ static BlockAssembler::Options DefaultOptions()
70 | // If -blockmaxweight is not given, limit to DEFAULT_BLOCK_MAX_WEIGHT
71 | BlockAssembler::Options options;
72 | options.nBlockMaxWeight = gArgs.GetArg("-blockmaxweight", DEFAULT_BLOCK_MAX_WEIGHT);
73 | - if (gArgs.IsArgSet("-blockmintxfee")) {
74 | - CAmount n = 0;
75 | - ParseMoney(gArgs.GetArg("-blockmintxfee", ""), n);
76 | + CAmount n = 0;
77 | + if (gArgs.IsArgSet("-blockmintxfee") && ParseMoney(gArgs.GetArg("-blockmintxfee", ""), n)) {
with this change the scope of variable n expands and "leaks" outside of where it's used.
perhaps not a big deal, but if we allow C++17 this could be written as:
if (CAmount n = 0; gArgs.IsArgSet("-blockmintxfee") && ParseMoney(gArgs.GetArg("-blockmintxfee", ""), n)) {