From 93b594afc0604802df363656865516c2205bce40 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Wed, 1 Nov 2023 10:21:38 -0700 Subject: [PATCH] give 3 seconds instead of 10 --- web3_proxy/src/jsonrpc/request_builder.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/web3_proxy/src/jsonrpc/request_builder.rs b/web3_proxy/src/jsonrpc/request_builder.rs index 9344d346..e4b6bb34 100644 --- a/web3_proxy/src/jsonrpc/request_builder.rs +++ b/web3_proxy/src/jsonrpc/request_builder.rs @@ -355,7 +355,7 @@ impl ValidatedRequest { _ => CacheMode::Never, }; - let connect_timeout = Duration::from_secs(3); + let connect_timeout = Duration::from_secs(10); let expire_timeout = max_wait.unwrap_or_else(|| Duration::from_secs(295)); let x = Self { @@ -512,8 +512,7 @@ impl ValidatedRequest { #[inline] pub fn connect_timeout_at(&self) -> Instant { - // TODO: get from config - self.start_instant + Duration::from_secs(3) + self.start_instant + self.connect_timeout } #[inline] @@ -525,7 +524,7 @@ impl ValidatedRequest { pub fn expire_at(&self) -> Instant { // TODO: get from config // erigon's timeout is 5 minutes so we want it shorter than that - self.start_instant + Duration::from_secs(295) + self.start_instant + self.expire_timeout } #[inline]