Unverified Commit 2a9ea6be authored by Giuseppe Bertone's avatar Giuseppe Bertone Committed by GitHub

cmd/geth, cmd/utils: fixed flags name (#21700)

parent 7a5a8229
...@@ -188,8 +188,8 @@ var ( ...@@ -188,8 +188,8 @@ var (
utils.IPCDisabledFlag, utils.IPCDisabledFlag,
utils.IPCPathFlag, utils.IPCPathFlag,
utils.InsecureUnlockAllowedFlag, utils.InsecureUnlockAllowedFlag,
utils.RPCGlobalGasCap, utils.RPCGlobalGasCapFlag,
utils.RPCGlobalTxFeeCap, utils.RPCGlobalTxFeeCapFlag,
} }
whisperFlags = []cli.Flag{ whisperFlags = []cli.Flag{
......
...@@ -144,8 +144,8 @@ var AppHelpFlagGroups = []flags.FlagGroup{ ...@@ -144,8 +144,8 @@ var AppHelpFlagGroups = []flags.FlagGroup{
utils.GraphQLEnabledFlag, utils.GraphQLEnabledFlag,
utils.GraphQLCORSDomainFlag, utils.GraphQLCORSDomainFlag,
utils.GraphQLVirtualHostsFlag, utils.GraphQLVirtualHostsFlag,
utils.RPCGlobalGasCap, utils.RPCGlobalGasCapFlag,
utils.RPCGlobalTxFeeCap, utils.RPCGlobalTxFeeCapFlag,
utils.JSpathFlag, utils.JSpathFlag,
utils.ExecFlag, utils.ExecFlag,
utils.PreloadJSFlag, utils.PreloadJSFlag,
......
...@@ -454,12 +454,12 @@ var ( ...@@ -454,12 +454,12 @@ var (
Name: "allow-insecure-unlock", Name: "allow-insecure-unlock",
Usage: "Allow insecure account unlocking when account-related RPCs are exposed by http", Usage: "Allow insecure account unlocking when account-related RPCs are exposed by http",
} }
RPCGlobalGasCap = cli.Uint64Flag{ RPCGlobalGasCapFlag = cli.Uint64Flag{
Name: "rpc.gascap", Name: "rpc.gascap",
Usage: "Sets a cap on gas that can be used in eth_call/estimateGas (0=infinite)", Usage: "Sets a cap on gas that can be used in eth_call/estimateGas (0=infinite)",
Value: eth.DefaultConfig.RPCGasCap, Value: eth.DefaultConfig.RPCGasCap,
} }
RPCGlobalTxFeeCap = cli.Float64Flag{ RPCGlobalTxFeeCapFlag = cli.Float64Flag{
Name: "rpc.txfeecap", Name: "rpc.txfeecap",
Usage: "Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = no cap)", Usage: "Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = no cap)",
Value: eth.DefaultConfig.RPCTxFeeCap, Value: eth.DefaultConfig.RPCTxFeeCap,
...@@ -1563,16 +1563,16 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) { ...@@ -1563,16 +1563,16 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
if ctx.GlobalIsSet(EVMInterpreterFlag.Name) { if ctx.GlobalIsSet(EVMInterpreterFlag.Name) {
cfg.EVMInterpreter = ctx.GlobalString(EVMInterpreterFlag.Name) cfg.EVMInterpreter = ctx.GlobalString(EVMInterpreterFlag.Name)
} }
if ctx.GlobalIsSet(RPCGlobalGasCap.Name) { if ctx.GlobalIsSet(RPCGlobalGasCapFlag.Name) {
cfg.RPCGasCap = ctx.GlobalUint64(RPCGlobalGasCap.Name) cfg.RPCGasCap = ctx.GlobalUint64(RPCGlobalGasCapFlag.Name)
} }
if cfg.RPCGasCap != 0 { if cfg.RPCGasCap != 0 {
log.Info("Set global gas cap", "cap", cfg.RPCGasCap) log.Info("Set global gas cap", "cap", cfg.RPCGasCap)
} else { } else {
log.Info("Global gas cap disabled") log.Info("Global gas cap disabled")
} }
if ctx.GlobalIsSet(RPCGlobalTxFeeCap.Name) { if ctx.GlobalIsSet(RPCGlobalTxFeeCapFlag.Name) {
cfg.RPCTxFeeCap = ctx.GlobalFloat64(RPCGlobalTxFeeCap.Name) cfg.RPCTxFeeCap = ctx.GlobalFloat64(RPCGlobalTxFeeCapFlag.Name)
} }
if ctx.GlobalIsSet(DNSDiscoveryFlag.Name) { if ctx.GlobalIsSet(DNSDiscoveryFlag.Name) {
urls := ctx.GlobalString(DNSDiscoveryFlag.Name) urls := ctx.GlobalString(DNSDiscoveryFlag.Name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment