utils: fix ineffectual miner config flags (#21271)

Without use of global, these flags didn't actually modify
miner configuration, since we weren't grabbing from the
proper context scope, which should be global (vs. subcommand).

Signed-off-by: meows <b5c6@protonmail.com>
release/1.9
meowsbits 4 years ago committed by GitHub
parent 02cea2330d
commit c13df14581
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      cmd/utils/flags.go

@ -1402,10 +1402,10 @@ func setMiner(ctx *cli.Context, cfg *miner.Config) {
cfg.GasPrice = GlobalBig(ctx, MinerGasPriceFlag.Name)
}
if ctx.GlobalIsSet(MinerRecommitIntervalFlag.Name) {
cfg.Recommit = ctx.Duration(MinerRecommitIntervalFlag.Name)
cfg.Recommit = ctx.GlobalDuration(MinerRecommitIntervalFlag.Name)
}
if ctx.GlobalIsSet(MinerNoVerfiyFlag.Name) {
cfg.Noverify = ctx.Bool(MinerNoVerfiyFlag.Name)
cfg.Noverify = ctx.GlobalBool(MinerNoVerfiyFlag.Name)
}
}

Loading…
Cancel
Save