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)