diff --git a/zebrad/src/components/sync.rs b/zebrad/src/components/sync.rs index 4850d32e..70e30193 100644 --- a/zebrad/src/components/sync.rs +++ b/zebrad/src/components/sync.rs @@ -148,6 +148,9 @@ where // making a less-fallible network service, and the Hedge layer // tries to reduce latency of that less-fallible service. // + // We hedge every request. If we don't have any recent timings, + // Hedge issues a second request with no delay. + // // XXX add ServiceBuilder::hedge() so this becomes // ServiceBuilder::new().hedge(...).retry(...)... let block_network = Hedge::new( @@ -157,7 +160,7 @@ where .timeout(BLOCK_DOWNLOAD_TIMEOUT) .service(peers), AlwaysHedge, - 20, + 0, 0.95, 2 * SYNC_RESTART_TIMEOUT, );