From 733edae435c8fd5204311543e31f3bc51d879740 Mon Sep 17 00:00:00 2001 From: Darshan K <35736874+darshankabariya@users.noreply.github.com> Date: Fri, 21 Jun 2024 17:47:44 +0530 Subject: [PATCH] chore: update content-topic parsing for filter (#2835) * chore: update content parsing for filter * chore: update according to suggestion * chore: update according to suggestion --- waku/factory/node_factory.nim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/waku/factory/node_factory.nim b/waku/factory/node_factory.nim index 9c442ad36..e2202261c 100644 --- a/waku/factory/node_factory.nim +++ b/waku/factory/node_factory.nim @@ -144,13 +144,13 @@ proc setupProtocols( peerExchangeHandler = some(handlePeerExchange) - if conf.relay: - let shards = - conf.contentTopics.mapIt(node.wakuSharding.getShard(it).expect("Valid Shard")) - let pubsubTopics = conf.pubsubTopics & shards + let shards = + conf.contentTopics.mapIt(node.wakuSharding.getShard(it).expect("Valid Shard")) + debug "Shards created from content topics", + contentTopics = conf.contentTopics, shards = shards - debug "Shards created from content topics", - contentTopics = conf.contentTopics, shards = shards + if conf.relay: + let pubsubTopics = conf.pubsubTopics & shards let parsedMaxMsgSize = parseMsgSize(conf.maxMessageSize).valueOr: return err("failed to parse 'max-num-bytes-msg-size' param: " & $error)