Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ func (h *Server) Start() error {
CheckTimeouts(h.logger, &h.timeouts)
h.server.ReadTimeout = h.timeouts.ReadTimeout
h.server.ReadHeaderTimeout = h.timeouts.ReadHeaderTimeout
h.server.WriteTimeout = h.timeouts.WriteTimeout
// WriteTimeout is the maximum duration before timing out
// writes of the response, a.k.a JSON-RPC request timeout.
h.server.WriteTimeout = h.config.RpcRequestTimeout
Comment thread
m-Peter marked this conversation as resolved.
h.server.IdleTimeout = h.timeouts.IdleTimeout
}

Expand Down
1 change: 1 addition & 0 deletions cmd/run/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ func init() {
Cmd.Flags().BoolVar(&cfg.TxBatchMode, "tx-batch-mode", false, "Enable batch transaction submission, to avoid nonce mismatch issues for high-volume EOAs.")
Cmd.Flags().DurationVar(&cfg.TxBatchInterval, "tx-batch-interval", time.Millisecond*1200, "Time interval upon which to submit the transaction batches to the Flow network.")
Cmd.Flags().DurationVar(&cfg.EOAActivityCacheTTL, "eoa-activity-cache-ttl", time.Second*10, "Time interval used to track EOA activity. Tx send more frequently than this interval will be batched. Useful only when batch transaction submission is enabled.")
Cmd.Flags().DurationVar(&cfg.RpcRequestTimeout, "rpc-request-timeout", time.Second*120, "Sets the maximum duration at which JSON-RPC requests should generate a response, before they timeout. The default is 120 seconds.")

err := Cmd.Flags().MarkDeprecated("init-cadence-height", "This flag is no longer necessary and will be removed in future version. The initial Cadence height is known for testnet/mainnet and this was only required for fresh deployments of EVM Gateway. Once the DB has been initialized, the latest index Cadence height will be used upon start-up.")
if err != nil {
Expand Down
3 changes: 3 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,7 @@ type Config struct {
// frequently than this interval will be batched.
// Useful only when batch transaction submission is enabled.
EOAActivityCacheTTL time.Duration
// RpcRequestTimeout is the maximum duration at which JSON-RPC requests should generate
// a response, before they timeout.
RpcRequestTimeout time.Duration
}