From be7346d3ea2b6f70ac078167d847725c3f86d19d Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Fri, 22 Nov 2019 19:51:52 +1100 Subject: [PATCH] Add different http timeout for debug --- eth2/utils/remote_beacon_node/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eth2/utils/remote_beacon_node/src/lib.rs b/eth2/utils/remote_beacon_node/src/lib.rs index 31960d925b..48ebc7c59c 100644 --- a/eth2/utils/remote_beacon_node/src/lib.rs +++ b/eth2/utils/remote_beacon_node/src/lib.rs @@ -22,6 +22,11 @@ use url::Url; pub use rest_api::{BulkValidatorDutiesRequest, HeadResponse, ValidatorDuty}; +// Setting a long timeout for debug ensures that crypto-heavy operations can still succeed. +#[cfg(debug_assertions)] +pub const REQUEST_TIMEOUT_SECONDS: u64 = 15; + +#[cfg(not(debug_assertions))] pub const REQUEST_TIMEOUT_SECONDS: u64 = 5; #[derive(Clone)]