From 797cb2a7e702053aec05fe3584ba67c6173c5689 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Wed, 26 Jun 2024 13:55:41 -0700 Subject: [PATCH] default gas price flag --- cmd/utils/flags.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 46d380b98499..baf0c8f339f0 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -870,6 +870,11 @@ var ( Value: ethconfig.Defaults.GPO.IgnorePrice.Int64(), Category: flags.GasPriceCategory, } + GpoDefaultGasPriceFlag = &cli.Int64Flag{ + Name: "gpo.defaultprice", + Usage: "Default gas price", + Category: flags.GasPriceCategory, + } // Metrics flags MetricsEnabledFlag = &cli.BoolFlag{ @@ -1505,6 +1510,9 @@ func setGPO(ctx *cli.Context, cfg *gasprice.Config) { if ctx.IsSet(GpoIgnoreGasPriceFlag.Name) { cfg.IgnorePrice = big.NewInt(ctx.Int64(GpoIgnoreGasPriceFlag.Name)) } + if ctx.IsSet(GpoDefaultGasPriceFlag.Name) { + cfg.Default = big.NewInt(ctx.Int64(GpoDefaultGasPriceFlag.Name)) + } } func setTxPool(ctx *cli.Context, cfg *legacypool.Config) {