mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-15 16:33:47 +00:00
feat(eth): add default gpo price flag (#258)
* default flag * default max price * comments
This commit is contained in:
parent
ef40d46c0e
commit
0fb7ce1999
2 changed files with 12 additions and 0 deletions
|
|
@ -143,6 +143,8 @@ var (
|
||||||
utils.GpoPercentileFlag,
|
utils.GpoPercentileFlag,
|
||||||
utils.GpoMaxGasPriceFlag,
|
utils.GpoMaxGasPriceFlag,
|
||||||
utils.GpoIgnoreGasPriceFlag,
|
utils.GpoIgnoreGasPriceFlag,
|
||||||
|
// CHANGE(taiko): use default gas price flag
|
||||||
|
utils.GpoDefaultGasPriceFlag,
|
||||||
configFileFlag,
|
configFileFlag,
|
||||||
utils.LogDebugFlag,
|
utils.LogDebugFlag,
|
||||||
utils.LogBacktraceAtFlag,
|
utils.LogBacktraceAtFlag,
|
||||||
|
|
|
||||||
|
|
@ -813,6 +813,12 @@ var (
|
||||||
Value: ethconfig.Defaults.GPO.IgnorePrice.Int64(),
|
Value: ethconfig.Defaults.GPO.IgnorePrice.Int64(),
|
||||||
Category: flags.GasPriceCategory,
|
Category: flags.GasPriceCategory,
|
||||||
}
|
}
|
||||||
|
// CHANGE(taiko): use default gas price flag
|
||||||
|
GpoDefaultGasPriceFlag = &cli.Int64Flag{
|
||||||
|
Name: "gpo.defaultprice",
|
||||||
|
Usage: "Default gas price",
|
||||||
|
Category: flags.GasPriceCategory,
|
||||||
|
}
|
||||||
|
|
||||||
// Metrics flags
|
// Metrics flags
|
||||||
MetricsEnabledFlag = &cli.BoolFlag{
|
MetricsEnabledFlag = &cli.BoolFlag{
|
||||||
|
|
@ -1450,6 +1456,10 @@ func setGPO(ctx *cli.Context, cfg *gasprice.Config) {
|
||||||
if ctx.IsSet(GpoIgnoreGasPriceFlag.Name) {
|
if ctx.IsSet(GpoIgnoreGasPriceFlag.Name) {
|
||||||
cfg.IgnorePrice = big.NewInt(ctx.Int64(GpoIgnoreGasPriceFlag.Name))
|
cfg.IgnorePrice = big.NewInt(ctx.Int64(GpoIgnoreGasPriceFlag.Name))
|
||||||
}
|
}
|
||||||
|
// CHANGE(taiko): use flag
|
||||||
|
if ctx.IsSet(GpoDefaultGasPriceFlag.Name) {
|
||||||
|
cfg.Default = big.NewInt(ctx.Int64(GpoDefaultGasPriceFlag.Name))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func setTxPool(ctx *cli.Context, cfg *legacypool.Config) {
|
func setTxPool(ctx *cli.Context, cfg *legacypool.Config) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue