From 9691dfb5e2f2e12935045be05f65a6c737b973fe Mon Sep 17 00:00:00 2001 From: DarshanBPatel Date: Fri, 21 Jun 2024 02:10:08 +0530 Subject: [PATCH 1/3] chore: update content parsing for filter --- waku/factory/node_factory.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waku/factory/node_factory.nim b/waku/factory/node_factory.nim index 9c442ad36a..e01944ce15 100644 --- a/waku/factory/node_factory.nim +++ b/waku/factory/node_factory.nim @@ -144,7 +144,7 @@ proc setupProtocols( peerExchangeHandler = some(handlePeerExchange) - if conf.relay: + if conf.relay or conf.filter: let shards = conf.contentTopics.mapIt(node.wakuSharding.getShard(it).expect("Valid Shard")) let pubsubTopics = conf.pubsubTopics & shards From 11b575d3f94de25b38e7a82f5809b7efdeac7460 Mon Sep 17 00:00:00 2001 From: DarshanBPatel Date: Fri, 21 Jun 2024 14:20:29 +0530 Subject: [PATCH 2/3] chore: update according to suggestion --- waku/factory/node_factory.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/waku/factory/node_factory.nim b/waku/factory/node_factory.nim index e01944ce15..8c36c15017 100644 --- a/waku/factory/node_factory.nim +++ b/waku/factory/node_factory.nim @@ -144,9 +144,9 @@ proc setupProtocols( peerExchangeHandler = some(handlePeerExchange) - if conf.relay or conf.filter: - let shards = - conf.contentTopics.mapIt(node.wakuSharding.getShard(it).expect("Valid Shard")) + let shards = + conf.contentTopics.mapIt(node.wakuSharding.getShard(it).expect("Valid Shard")) + if conf.relay: let pubsubTopics = conf.pubsubTopics & shards debug "Shards created from content topics", From 1dc419606d3fc9d215fb9bdee7289cf30d338802 Mon Sep 17 00:00:00 2001 From: DarshanBPatel Date: Fri, 21 Jun 2024 16:18:00 +0530 Subject: [PATCH 3/3] chore: update according to suggestion --- waku/factory/node_factory.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/waku/factory/node_factory.nim b/waku/factory/node_factory.nim index 8c36c15017..e2202261c8 100644 --- a/waku/factory/node_factory.nim +++ b/waku/factory/node_factory.nim @@ -146,12 +146,12 @@ proc setupProtocols( let shards = conf.contentTopics.mapIt(node.wakuSharding.getShard(it).expect("Valid Shard")) + debug "Shards created from content topics", + contentTopics = conf.contentTopics, shards = shards + if conf.relay: let pubsubTopics = conf.pubsubTopics & shards - debug "Shards created from content topics", - contentTopics = conf.contentTopics, shards = shards - let parsedMaxMsgSize = parseMsgSize(conf.maxMessageSize).valueOr: return err("failed to parse 'max-num-bytes-msg-size' param: " & $error)