Skip to content

Commit

Permalink
utils: fix ineffectual miner config flags (ethereum#21271)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
meowsbits committed Jun 30, 2020
1 parent 02cea23 commit c13df14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit c13df14

Please sign in to comment.