From 2a9ea6be87a282ae3d0171a631076ea983d02477 Mon Sep 17 00:00:00 2001 From: Giuseppe Bertone Date: Tue, 13 Oct 2020 13:33:10 +0200 Subject: [PATCH] cmd/geth, cmd/utils: fixed flags name (#21700) --- cmd/geth/main.go | 4 ++-- cmd/geth/usage.go | 4 ++-- cmd/utils/flags.go | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 677a19eed..8c1f7c4c2 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -188,8 +188,8 @@ var ( utils.IPCDisabledFlag, utils.IPCPathFlag, utils.InsecureUnlockAllowedFlag, - utils.RPCGlobalGasCap, - utils.RPCGlobalTxFeeCap, + utils.RPCGlobalGasCapFlag, + utils.RPCGlobalTxFeeCapFlag, } whisperFlags = []cli.Flag{ diff --git a/cmd/geth/usage.go b/cmd/geth/usage.go index 334a729c2..288c45359 100644 --- a/cmd/geth/usage.go +++ b/cmd/geth/usage.go @@ -144,8 +144,8 @@ var AppHelpFlagGroups = []flags.FlagGroup{ utils.GraphQLEnabledFlag, utils.GraphQLCORSDomainFlag, utils.GraphQLVirtualHostsFlag, - utils.RPCGlobalGasCap, - utils.RPCGlobalTxFeeCap, + utils.RPCGlobalGasCapFlag, + utils.RPCGlobalTxFeeCapFlag, utils.JSpathFlag, utils.ExecFlag, utils.PreloadJSFlag, diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 55b751d62..80da518c2 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -454,12 +454,12 @@ var ( Name: "allow-insecure-unlock", Usage: "Allow insecure account unlocking when account-related RPCs are exposed by http", } - RPCGlobalGasCap = cli.Uint64Flag{ + RPCGlobalGasCapFlag = cli.Uint64Flag{ Name: "rpc.gascap", Usage: "Sets a cap on gas that can be used in eth_call/estimateGas (0=infinite)", Value: eth.DefaultConfig.RPCGasCap, } - RPCGlobalTxFeeCap = cli.Float64Flag{ + RPCGlobalTxFeeCapFlag = cli.Float64Flag{ Name: "rpc.txfeecap", Usage: "Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = no cap)", Value: eth.DefaultConfig.RPCTxFeeCap, @@ -1563,16 +1563,16 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) { if ctx.GlobalIsSet(EVMInterpreterFlag.Name) { cfg.EVMInterpreter = ctx.GlobalString(EVMInterpreterFlag.Name) } - if ctx.GlobalIsSet(RPCGlobalGasCap.Name) { - cfg.RPCGasCap = ctx.GlobalUint64(RPCGlobalGasCap.Name) + if ctx.GlobalIsSet(RPCGlobalGasCapFlag.Name) { + cfg.RPCGasCap = ctx.GlobalUint64(RPCGlobalGasCapFlag.Name) } if cfg.RPCGasCap != 0 { log.Info("Set global gas cap", "cap", cfg.RPCGasCap) } else { log.Info("Global gas cap disabled") } - if ctx.GlobalIsSet(RPCGlobalTxFeeCap.Name) { - cfg.RPCTxFeeCap = ctx.GlobalFloat64(RPCGlobalTxFeeCap.Name) + if ctx.GlobalIsSet(RPCGlobalTxFeeCapFlag.Name) { + cfg.RPCTxFeeCap = ctx.GlobalFloat64(RPCGlobalTxFeeCapFlag.Name) } if ctx.GlobalIsSet(DNSDiscoveryFlag.Name) { urls := ctx.GlobalString(DNSDiscoveryFlag.Name)