mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
renames gpo related flags
This commit is contained in:
parent
574d182a93
commit
3c7b84eaae
3 changed files with 23 additions and 2 deletions
|
|
@ -146,7 +146,9 @@ var (
|
||||||
utils.FakePoWFlag,
|
utils.FakePoWFlag,
|
||||||
utils.NoCompactionFlag,
|
utils.NoCompactionFlag,
|
||||||
utils.GpoBlocksFlag,
|
utils.GpoBlocksFlag,
|
||||||
|
utils.GpoLegacyBlocksFlag,
|
||||||
utils.GpoPercentileFlag,
|
utils.GpoPercentileFlag,
|
||||||
|
utils.GpoLegacyPercentileFlag,
|
||||||
utils.EWASMInterpreterFlag,
|
utils.EWASMInterpreterFlag,
|
||||||
utils.EVMInterpreterFlag,
|
utils.EVMInterpreterFlag,
|
||||||
configFileFlag,
|
configFileFlag,
|
||||||
|
|
|
||||||
|
|
@ -259,6 +259,8 @@ var AppHelpFlagGroups = []flagGroup{
|
||||||
utils.RPCLegacyCORSDomainFlag,
|
utils.RPCLegacyCORSDomainFlag,
|
||||||
utils.RPCLegacyVirtualHostsFlag,
|
utils.RPCLegacyVirtualHostsFlag,
|
||||||
utils.RPCLegacyApiFlag,
|
utils.RPCLegacyApiFlag,
|
||||||
|
utils.GpoLegacyBlocksFlag,
|
||||||
|
utils.GpoLegacyPercentileFlag,
|
||||||
}, debug.DeprecatedFlags...),
|
}, debug.DeprecatedFlags...),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -714,15 +714,25 @@ var (
|
||||||
|
|
||||||
// Gas price oracle settings
|
// Gas price oracle settings
|
||||||
GpoBlocksFlag = cli.IntFlag{
|
GpoBlocksFlag = cli.IntFlag{
|
||||||
Name: "gpoblocks",
|
Name: "gpo.blocks",
|
||||||
Usage: "Number of recent blocks to check for gas prices",
|
Usage: "Number of recent blocks to check for gas prices",
|
||||||
Value: eth.DefaultConfig.GPO.Blocks,
|
Value: eth.DefaultConfig.GPO.Blocks,
|
||||||
}
|
}
|
||||||
|
GpoLegacyBlocksFlag = cli.IntFlag{
|
||||||
|
Name: "gpoblocks",
|
||||||
|
Usage: "Number of recent blocks to check for gas prices (deprecated, use --gpo.blocks)",
|
||||||
|
Value: eth.DefaultConfig.GPO.Blocks,
|
||||||
|
}
|
||||||
GpoPercentileFlag = cli.IntFlag{
|
GpoPercentileFlag = cli.IntFlag{
|
||||||
Name: "gpopercentile",
|
Name: "gpo.percentile",
|
||||||
Usage: "Suggested gas price is the given percentile of a set of recent transaction gas prices",
|
Usage: "Suggested gas price is the given percentile of a set of recent transaction gas prices",
|
||||||
Value: eth.DefaultConfig.GPO.Percentile,
|
Value: eth.DefaultConfig.GPO.Percentile,
|
||||||
}
|
}
|
||||||
|
GpoLegacyPercentileFlag = cli.IntFlag{
|
||||||
|
Name: "gpopercentile",
|
||||||
|
Usage: "Suggested gas price is the given percentile of a set of recent transaction gas prices (deprecated, use --gpo.percentile)",
|
||||||
|
Value: eth.DefaultConfig.GPO.Percentile,
|
||||||
|
}
|
||||||
WhisperEnabledFlag = cli.BoolFlag{
|
WhisperEnabledFlag = cli.BoolFlag{
|
||||||
Name: "shh",
|
Name: "shh",
|
||||||
Usage: "Enable Whisper",
|
Usage: "Enable Whisper",
|
||||||
|
|
@ -1310,9 +1320,16 @@ func setDataDir(ctx *cli.Context, cfg *node.Config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func setGPO(ctx *cli.Context, cfg *gasprice.Config) {
|
func setGPO(ctx *cli.Context, cfg *gasprice.Config) {
|
||||||
|
if ctx.GlobalIsSet(GpoLegacyBlocksFlag.Name) {
|
||||||
|
cfg.Blocks = ctx.GlobalInt(GpoLegacyBlocksFlag.Name)
|
||||||
|
}
|
||||||
if ctx.GlobalIsSet(GpoBlocksFlag.Name) {
|
if ctx.GlobalIsSet(GpoBlocksFlag.Name) {
|
||||||
cfg.Blocks = ctx.GlobalInt(GpoBlocksFlag.Name)
|
cfg.Blocks = ctx.GlobalInt(GpoBlocksFlag.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ctx.GlobalIsSet(GpoLegacyPercentileFlag.Name) {
|
||||||
|
cfg.Percentile = ctx.GlobalInt(GpoLegacyPercentileFlag.Name)
|
||||||
|
}
|
||||||
if ctx.GlobalIsSet(GpoPercentileFlag.Name) {
|
if ctx.GlobalIsSet(GpoPercentileFlag.Name) {
|
||||||
cfg.Percentile = ctx.GlobalInt(GpoPercentileFlag.Name)
|
cfg.Percentile = ctx.GlobalInt(GpoPercentileFlag.Name)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue