Skip to main content

initial_update_interval

Function initial_update_interval 

Source
async fn initial_update_interval(config: &Config) -> Duration
Expand description

Returns how long to wait before the first peer cache update attempt.

When no peer cache file exists on disk yet, shortens the initial wait to at most config.crawl_new_peer_interval so newly started nodes can populate the initial cache promptly. When a peer cache file already exists (or its existence cannot be verified), keeps the full DNS_LOOKUP_TIMEOUT * 4 delay so discovery settles before overwriting cached fallback peers.