From c13df1458118067cbfd74d5eff03bf3f7368f8cb Mon Sep 17 00:00:00 2001 From: meowsbits Date: Tue, 30 Jun 2020 02:05:25 -0500 Subject: [PATCH] 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 --- cmd/utils/flags.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index dbc1cdad1f..088f012fed 100644 --- a/cmd/utils/flags.go +++ b/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) } }