From dc571d0101dee613235adc2782ed3640ab93ee30 Mon Sep 17 00:00:00 2001 From: Simon-Pierre Vivier Date: Mon, 24 Mar 2025 08:36:19 -0400 Subject: [PATCH] fix: waku sync timing (#3337) --- waku/node/waku_node.nim | 6 +++--- waku/waku_store_sync/reconciliation.nim | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/waku/node/waku_node.nim b/waku/node/waku_node.nim index fafce4211..cb712befd 100644 --- a/waku/node/waku_node.nim +++ b/waku/node/waku_node.nim @@ -214,9 +214,9 @@ proc mountStoreSync*( storeSyncInterval = 300, storeSyncRelayJitter = 20, ): Future[Result[void, string]] {.async.} = - let idsChannel = newAsyncQueue[SyncID](100) - let wantsChannel = newAsyncQueue[(PeerId, WakuMessageHash)](100) - let needsChannel = newAsyncQueue[(PeerId, WakuMessageHash)](100) + let idsChannel = newAsyncQueue[SyncID](0) + let wantsChannel = newAsyncQueue[(PeerId, WakuMessageHash)](0) + let needsChannel = newAsyncQueue[(PeerId, WakuMessageHash)](0) var cluster: uint16 var shards: seq[uint16] diff --git a/waku/waku_store_sync/reconciliation.nim b/waku/waku_store_sync/reconciliation.nim index 6a5e7bbd5..80c025140 100644 --- a/waku/waku_store_sync/reconciliation.nim +++ b/waku/waku_store_sync/reconciliation.nim @@ -135,10 +135,10 @@ proc processRequest( sendPayload.shards = self.shards.toSeq() for hash in hashToSend: - await self.remoteNeedsTx.addLast((conn.peerId, hash)) + self.remoteNeedsTx.addLastNoWait((conn.peerId, hash)) for hash in hashToRecv: - await self.localWantstx.addLast((conn.peerId, hash)) + self.localWantsTx.addLastNoWait((conn.peerId, hash)) rawPayload = sendPayload.deltaEncode()