From fed4dc28045c857bde5d01cdd9761ab8be45aeb3 Mon Sep 17 00:00:00 2001 From: Darshan K <35736874+darshankabariya@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:08:47 +0530 Subject: [PATCH] chore: rest-relay-cache-capacity (#3454) --- waku/factory/external_config.nim | 2 +- waku/waku_api/rest/builder.nim | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/waku/factory/external_config.nim b/waku/factory/external_config.nim index 9617d4403..f85a9fae3 100644 --- a/waku/factory/external_config.nim +++ b/waku/factory/external_config.nim @@ -503,7 +503,7 @@ with the drawback of consuming some more bandwidth.""", restRelayCacheCapacity* {. desc: "Capacity of the Relay REST API message cache.", - defaultValue: 30, + defaultValue: 50, name: "rest-relay-cache-capacity" .}: uint32 diff --git a/waku/waku_api/rest/builder.nim b/waku/waku_api/rest/builder.nim index f11a11fbc..1b5d9af70 100644 --- a/waku/waku_api/rest/builder.nim +++ b/waku/waku_api/rest/builder.nim @@ -139,8 +139,7 @@ proc startRestServerProtocolSupport*( if relayEnabled: ## This MessageCache is used, f.e., in js-waku<>nwaku interop tests. ## js-waku tests asks nwaku-docker through REST whether a message is properly received. - const RestRelayCacheCapacity = 50 - let cache = MessageCache.init(int(RestRelayCacheCapacity)) + let cache = MessageCache.init(int(conf.relayCacheCapacity)) let handler: WakuRelayHandler = messageCacheHandler(cache)