eth,rpc: allow for flag configured timeouts for eth_call (#23645)
* eth,rpc: allow for flag configured timeouts for eth_call * lint: account for package-local import order * cr: rename `rpc.calltimeout` to `rpc.evmtimeout`
This commit is contained in:
@ -493,6 +493,11 @@ var (
|
||||
Usage: "Sets a cap on gas that can be used in eth_call/estimateGas (0=infinite)",
|
||||
Value: ethconfig.Defaults.RPCGasCap,
|
||||
}
|
||||
RPCGlobalEVMTimeoutFlag = cli.DurationFlag{
|
||||
Name: "rpc.evmtimeout",
|
||||
Usage: "Sets a timeout used for eth_call (0=infinite)",
|
||||
Value: ethconfig.Defaults.RPCEVMTimeout,
|
||||
}
|
||||
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)",
|
||||
@ -1563,6 +1568,9 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
|
||||
} else {
|
||||
log.Info("Global gas cap disabled")
|
||||
}
|
||||
if ctx.GlobalIsSet(RPCGlobalEVMTimeoutFlag.Name) {
|
||||
cfg.RPCEVMTimeout = ctx.GlobalDuration(RPCGlobalEVMTimeoutFlag.Name)
|
||||
}
|
||||
if ctx.GlobalIsSet(RPCGlobalTxFeeCapFlag.Name) {
|
||||
cfg.RPCTxFeeCap = ctx.GlobalFloat64(RPCGlobalTxFeeCapFlag.Name)
|
||||
}
|
||||
|
Reference in New Issue
Block a user