From dde023eacf11dae7311275103615e115fe424c7e Mon Sep 17 00:00:00 2001 From: gabrielmer <101006718+gabrielmer@users.noreply.github.com> Date: Fri, 4 Jul 2025 15:08:15 +0200 Subject: [PATCH] fix: static sharding setup (#3494) --- waku/factory/waku.nim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/waku/factory/waku.nim b/waku/factory/waku.nim index d733c6bf5..137e3531c 100644 --- a/waku/factory/waku.nim +++ b/waku/factory/waku.nim @@ -127,8 +127,12 @@ proc setupAppCallbacks( if node.wakuRelay.isNil(): return err("Cannot configure relayHandler callback without Relay mounted") - let autoShards = node.getAutoshards(conf.contentTopics).valueOr: - return err("Could not get autoshards: " & error) + let autoShards = + if node.wakuAutoSharding.isSome(): + node.getAutoshards(conf.contentTopics).valueOr: + return err("Could not get autoshards: " & error) + else: + @[] let confShards = conf.subscribeShards.mapIt( RelayShard(clusterId: conf.clusterId, shardId: uint16(it))