diff --git a/zebrad/src/components/sync.rs b/zebrad/src/components/sync.rs index c0b4e201c..48cbb9900 100644 --- a/zebrad/src/components/sync.rs +++ b/zebrad/src/components/sync.rs @@ -53,7 +53,7 @@ const FANOUT: usize = 3; /// /// We also hedge requests, so we may retry up to twice this many times. Hedged /// retries may be concurrent, inner retries are sequential. -const BLOCK_DOWNLOAD_RETRY_LIMIT: usize = 2; +const BLOCK_DOWNLOAD_RETRY_LIMIT: usize = 3; /// A lower bound on the user-specified lookahead limit. /// diff --git a/zebrad/src/components/sync/tests/timing.rs b/zebrad/src/components/sync/tests/timing.rs index 3f3f4cd16..b2b45e6d3 100644 --- a/zebrad/src/components/sync/tests/timing.rs +++ b/zebrad/src/components/sync/tests/timing.rs @@ -1,3 +1,5 @@ +//! Check the relationship between various sync timeouts and delays. + use std::{ convert::TryInto, sync::{ @@ -34,15 +36,10 @@ fn ensure_timeouts_consistent() { "Sync restart should allow for pending and buffered requests to complete" ); - // This constraint avoids spurious failures due to block retries timing out. // We multiply by 2, because the Hedge can wait up to BLOCK_DOWNLOAD_TIMEOUT // seconds before retrying. const BLOCK_DOWNLOAD_HEDGE_TIMEOUT: u64 = 2 * BLOCK_DOWNLOAD_RETRY_LIMIT as u64 * BLOCK_DOWNLOAD_TIMEOUT.as_secs(); - assert!( - SYNC_RESTART_DELAY.as_secs() > BLOCK_DOWNLOAD_HEDGE_TIMEOUT, - "Sync restart should allow for block downloads to time out on every retry" - ); // This constraint avoids spurious failures due to block download timeouts assert!(