rpc: Remove flags for setting HTTP Timeouts, configuring via .toml is sufficient.

This commit is contained in:
Ryan Schneider 2018-07-27 14:26:54 -07:00 committed by Péter Szilágyi
parent 24f28fd2b8
commit f1d697f486
No known key found for this signature in database
GPG key ID: E9AE538CEDF8293D
3 changed files with 0 additions and 33 deletions

View file

@ -130,9 +130,6 @@ var (
utils.RPCListenAddrFlag, utils.RPCListenAddrFlag,
utils.RPCPortFlag, utils.RPCPortFlag,
utils.RPCApiFlag, utils.RPCApiFlag,
utils.RPCReadTimeoutFlag,
utils.RPCWriteTimeoutFlag,
utils.RPCIdleTimeoutFlag,
utils.WSEnabledFlag, utils.WSEnabledFlag,
utils.WSListenAddrFlag, utils.WSListenAddrFlag,
utils.WSPortFlag, utils.WSPortFlag,

View file

@ -149,9 +149,6 @@ var AppHelpFlagGroups = []flagGroup{
utils.RPCListenAddrFlag, utils.RPCListenAddrFlag,
utils.RPCPortFlag, utils.RPCPortFlag,
utils.RPCApiFlag, utils.RPCApiFlag,
utils.RPCReadTimeoutFlag,
utils.RPCWriteTimeoutFlag,
utils.RPCIdleTimeoutFlag,
utils.WSEnabledFlag, utils.WSEnabledFlag,
utils.WSListenAddrFlag, utils.WSListenAddrFlag,
utils.WSPortFlag, utils.WSPortFlag,

View file

@ -57,7 +57,6 @@ import (
"github.com/ethereum/go-ethereum/p2p/nat" "github.com/ethereum/go-ethereum/p2p/nat"
"github.com/ethereum/go-ethereum/p2p/netutil" "github.com/ethereum/go-ethereum/p2p/netutil"
"github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rpc"
whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
"gopkg.in/urfave/cli.v1" "gopkg.in/urfave/cli.v1"
) )
@ -386,21 +385,6 @@ var (
Usage: "HTTP-RPC server listening port", Usage: "HTTP-RPC server listening port",
Value: node.DefaultHTTPPort, Value: node.DefaultHTTPPort,
} }
RPCReadTimeoutFlag = cli.DurationFlag{
Name: "rpcreadtimeout",
Usage: "HTTP-RPC server read timeout",
Value: rpc.DefaultHTTPReadTimeout,
}
RPCWriteTimeoutFlag = cli.DurationFlag{
Name: "rpcwritetimeout",
Usage: "HTTP-RPC server write timeout",
Value: rpc.DefaultHTTPWriteTimeout,
}
RPCIdleTimeoutFlag = cli.DurationFlag{
Name: "rpcidletimeout",
Usage: "HTTP-RPC server idle timeout",
Value: rpc.DefaultHTTPIdleTimeout,
}
RPCCORSDomainFlag = cli.StringFlag{ RPCCORSDomainFlag = cli.StringFlag{
Name: "rpccorsdomain", Name: "rpccorsdomain",
Usage: "Comma separated list of domains from which to accept cross origin requests (browser enforced)", Usage: "Comma separated list of domains from which to accept cross origin requests (browser enforced)",
@ -745,17 +729,6 @@ func setHTTP(ctx *cli.Context, cfg *node.Config) {
if ctx.GlobalIsSet(RPCVirtualHostsFlag.Name) { if ctx.GlobalIsSet(RPCVirtualHostsFlag.Name) {
cfg.HTTPVirtualHosts = splitAndTrim(ctx.GlobalString(RPCVirtualHostsFlag.Name)) cfg.HTTPVirtualHosts = splitAndTrim(ctx.GlobalString(RPCVirtualHostsFlag.Name))
} }
cfg.HTTPTimeouts = rpc.NewDefaultHTTPTimeouts()
if ctx.GlobalIsSet(RPCReadTimeoutFlag.Name) {
cfg.HTTPTimeouts.ReadTimeout = ctx.GlobalDuration(RPCReadTimeoutFlag.Name)
}
if ctx.GlobalIsSet(RPCWriteTimeoutFlag.Name) {
cfg.HTTPTimeouts.WriteTimeout = ctx.GlobalDuration(RPCWriteTimeoutFlag.Name)
}
if ctx.GlobalIsSet(RPCIdleTimeoutFlag.Name) {
cfg.HTTPTimeouts.IdleTimeout = ctx.GlobalDuration(RPCIdleTimeoutFlag.Name)
}
} }
// setWS creates the WebSocket RPC listener interface string from the set // setWS creates the WebSocket RPC listener interface string from the set