diff options
author | Ryan Schneider <ryanleeschneider@gmail.com> | 2018-07-31 17:16:14 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-07-31 17:16:14 +0800 |
commit | 5d7e18539e32cb4f1aafab8e977e28a7cd34da9c (patch) | |
tree | e79ed9d9659c68f7961cca6c8fa84492c49e5084 /node/config.go | |
parent | c4a1d4fecf5efcf5095c667b7b311061173799b4 (diff) | |
download | go-tangerine-5d7e18539e32cb4f1aafab8e977e28a7cd34da9c.tar go-tangerine-5d7e18539e32cb4f1aafab8e977e28a7cd34da9c.tar.gz go-tangerine-5d7e18539e32cb4f1aafab8e977e28a7cd34da9c.tar.bz2 go-tangerine-5d7e18539e32cb4f1aafab8e977e28a7cd34da9c.tar.lz go-tangerine-5d7e18539e32cb4f1aafab8e977e28a7cd34da9c.tar.xz go-tangerine-5d7e18539e32cb4f1aafab8e977e28a7cd34da9c.tar.zst go-tangerine-5d7e18539e32cb4f1aafab8e977e28a7cd34da9c.zip |
rpc: make HTTP RPC timeouts configurable, raise defaults (#17240)
* rpc: Make HTTP server timeout values configurable
* rpc: Remove flags for setting HTTP Timeouts, configuring via .toml is sufficient.
* rpc: Replace separate constants with a single default struct.
* rpc: Update HTTP Server Read and Write Timeouts to 30s.
* rpc: Remove redundant NewDefaultHTTPTimeouts function.
* rpc: document HTTPTimeouts.
* rpc: sanitize timeout values for library use
Diffstat (limited to 'node/config.go')
-rw-r--r-- | node/config.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/node/config.go b/node/config.go index 1b75baaeb..a4d5920a8 100644 --- a/node/config.go +++ b/node/config.go @@ -33,6 +33,7 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/discover" + "github.com/ethereum/go-ethereum/rpc" ) const ( @@ -119,6 +120,10 @@ type Config struct { // exposed. HTTPModules []string `toml:",omitempty"` + // HTTPTimeouts allows for customization of the timeout values used by the HTTP RPC + // interface. + HTTPTimeouts rpc.HTTPTimeouts + // WSHost is the host interface on which to start the websocket RPC server. If // this field is empty, no websocket API endpoint will be started. WSHost string `toml:",omitempty"` |