From 37c7b9588aaa7bc25453835b9299730e33f3cb47 Mon Sep 17 00:00:00 2001 From: gabrielmer <101006718+gabrielmer@users.noreply.github.com> Date: Thu, 24 Oct 2024 10:33:32 +0300 Subject: [PATCH] decreasing wait time for updating px cache on startup (#3140) --- waku/waku_peer_exchange/protocol.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/waku/waku_peer_exchange/protocol.nim b/waku/waku_peer_exchange/protocol.nim index 6821d848b..5b0a63539 100644 --- a/waku/waku_peer_exchange/protocol.nim +++ b/waku/waku_peer_exchange/protocol.nim @@ -219,11 +219,11 @@ proc populateEnrCache(wpx: WakuPeerExchange) = proc updatePxEnrCache(wpx: WakuPeerExchange) {.async.} = # try more aggressively to fill the cache at startup - var attempts = 10 + var attempts = 50 while wpx.enrCache.len < MaxPeersCacheSize and attempts > 0: attempts -= 1 wpx.populateEnrCache() - await sleepAsync(5.seconds) + await sleepAsync(1.seconds) heartbeat "Updating px enr cache", CacheRefreshInterval: wpx.populateEnrCache()