fix: don't mount metadata for clusterID 0

This commit is contained in:
Prem Chaitanya Prathi 2024-04-22 14:47:00 +02:00
parent e61e4ff90a
commit 581139ec79
No known key found for this signature in database
1 changed files with 5 additions and 6 deletions

View File

@ -113,12 +113,11 @@ proc setupProtocols(
## Setup configured protocols on an existing Waku v2 node.
## Optionally include persistent message storage.
## No protocols are started yet.
node.mountMetadata(conf.clusterId).isOkOr:
return err("failed to mount waku metadata protocol: " & error)
node.mountSharding(conf.clusterId, uint32(conf.pubsubTopics.len)).isOkOr:
return err("failed to mount waku sharding: " & error)
if conf.clusterId != 0:
node.mountMetadata(conf.clusterId).isOkOr:
return err("failed to mount waku metadata protocol: " & error)
node.mountSharding(conf.clusterId, uint32(conf.pubsubTopics.len)).isOkOr:
return err("failed to mount waku sharding: " & error)
# Mount relay on all nodes
var peerExchangeHandler = none(RoutingRecordsHandler)