cmd: fix flag variable name (#1958)

This commit is contained in:
Daniel Liu 2026-01-19 16:35:55 +08:00 committed by GitHub
parent 3742ed7f2f
commit df83610a30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 16 deletions

View file

@ -161,10 +161,10 @@ var (
utils.WSPathPrefixFlag,
utils.IPCDisabledFlag,
utils.IPCPathFlag,
utils.RPCGlobalTxFeeCap,
utils.AllowUnprotectedTxs,
utils.BatchRequestLimit,
utils.BatchResponseMaxSize,
utils.RPCGlobalTxFeeCapFlag,
utils.AllowUnprotectedTxsFlag,
utils.BatchRequestLimitFlag,
utils.BatchResponseMaxSizeFlag,
}
metricsFlags = []cli.Flag{

View file

@ -400,7 +400,7 @@ var (
Value: ethconfig.Defaults.RPCEVMTimeout,
Category: flags.APICategory,
}
RPCGlobalTxFeeCap = &cli.Float64Flag{
RPCGlobalTxFeeCapFlag = &cli.Float64Flag{
Name: "rpc-txfeecap",
Aliases: []string{"rpc.txfeecap"},
Usage: "Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = no cap)",
@ -580,18 +580,18 @@ var (
Usage: "Comma separated list of JavaScript files to preload into the console",
Category: flags.APICategory,
}
AllowUnprotectedTxs = &cli.BoolFlag{
AllowUnprotectedTxsFlag = &cli.BoolFlag{
Name: "rpc-allow-unprotected-txs",
Usage: "Allow for unprotected (non EIP155 signed) transactions to be submitted via RPC",
Category: flags.APICategory,
}
BatchRequestLimit = &cli.IntFlag{
BatchRequestLimitFlag = &cli.IntFlag{
Name: "rpc-batch-request-limit",
Usage: "Maximum number of requests in a batch",
Value: node.DefaultConfig.BatchRequestLimit,
Category: flags.APICategory,
}
BatchResponseMaxSize = &cli.IntFlag{
BatchResponseMaxSizeFlag = &cli.IntFlag{
Name: "rpc-batch-response-max-size",
Usage: "Maximum number of bytes returned from a batched call",
Value: node.DefaultConfig.BatchResponseMaxSize,
@ -1120,15 +1120,15 @@ func setHTTP(ctx *cli.Context, cfg *node.Config) {
cfg.HTTPTimeouts.IdleTimeout = ctx.Duration(HTTPIdleTimeoutFlag.Name)
}
if ctx.IsSet(AllowUnprotectedTxs.Name) {
cfg.AllowUnprotectedTxs = ctx.Bool(AllowUnprotectedTxs.Name)
if ctx.IsSet(AllowUnprotectedTxsFlag.Name) {
cfg.AllowUnprotectedTxs = ctx.Bool(AllowUnprotectedTxsFlag.Name)
}
if ctx.IsSet(BatchRequestLimit.Name) {
cfg.BatchRequestLimit = ctx.Int(BatchRequestLimit.Name)
if ctx.IsSet(BatchRequestLimitFlag.Name) {
cfg.BatchRequestLimit = ctx.Int(BatchRequestLimitFlag.Name)
}
if ctx.IsSet(BatchResponseMaxSize.Name) {
cfg.BatchResponseMaxSize = ctx.Int(BatchResponseMaxSize.Name)
if ctx.IsSet(BatchResponseMaxSizeFlag.Name) {
cfg.BatchResponseMaxSize = ctx.Int(BatchResponseMaxSizeFlag.Name)
}
}
@ -1510,8 +1510,8 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
if ctx.IsSet(RPCGlobalGasCapFlag.Name) {
cfg.RPCGasCap = ctx.Uint64(RPCGlobalGasCapFlag.Name)
}
if ctx.IsSet(RPCGlobalTxFeeCap.Name) {
cfg.RPCTxFeeCap = ctx.Float64(RPCGlobalTxFeeCap.Name)
if ctx.IsSet(RPCGlobalTxFeeCapFlag.Name) {
cfg.RPCTxFeeCap = ctx.Float64(RPCGlobalTxFeeCapFlag.Name)
}
if ctx.IsSet(RPCGlobalGasCapFlag.Name) {
cfg.RPCGasCap = ctx.Uint64(RPCGlobalGasCapFlag.Name)