Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(taiko): Default price flag #258

Merged
merged 7 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ var (
utils.GpoPercentileFlag,
utils.GpoMaxGasPriceFlag,
utils.GpoIgnoreGasPriceFlag,
// CHANGE(taiko): use default gas price flag
utils.GpoDefaultGasPriceFlag,
configFileFlag,
utils.LogDebugFlag,
utils.LogBacktraceAtFlag,
Expand Down
10 changes: 10 additions & 0 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,12 @@ var (
Value: ethconfig.Defaults.GPO.IgnorePrice.Int64(),
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
MetricsEnabledFlag = &cli.BoolFlag{
Expand Down Expand Up @@ -1450,6 +1456,10 @@ func setGPO(ctx *cli.Context, cfg *gasprice.Config) {
if ctx.IsSet(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) {
Expand Down
Loading