diff --git a/apps/wakucanary/wakucanary.nim b/apps/wakucanary/wakucanary.nim index 8ba6cf48bd..ef72881a85 100644 --- a/apps/wakucanary/wakucanary.nim +++ b/apps/wakucanary/wakucanary.nim @@ -237,7 +237,7 @@ proc main(rng: ref HmacDrbgContext): Future[int] {.async.} = error "failed to mount libp2p ping protocol: " & getCurrentExceptionMsg() return 1 - node.mountMetadata(conf.clusterId).isOkOr: + node.mountMetadata(conf.clusterId, conf.shards).isOkOr: error "failed to mount waku metadata protocol: ", err = error await node.start() diff --git a/vendor/nim-bearssl b/vendor/nim-bearssl index a806cbfab5..86f212c6a5 160000 --- a/vendor/nim-bearssl +++ b/vendor/nim-bearssl @@ -1 +1 @@ -Subproject commit a806cbfab5fe8de49c76139f8705fff79daf99ee +Subproject commit 86f212c6a5d76b52e20fad2e318cc5436d04fc26 diff --git a/waku/node/waku_node.nim b/waku/node/waku_node.nim index 77cba5567b..76af79d3f0 100644 --- a/waku/node/waku_node.nim +++ b/waku/node/waku_node.nim @@ -194,12 +194,15 @@ proc connectToNodes*( ## Waku Metadata -proc mountMetadata*(node: WakuNode, clusterId: uint32): Result[void, string] = +proc mountMetadata*( + node: WakuNode, clusterId: uint32, shards: seq[uint16] = @[] +): Result[void, string] = if not node.wakuMetadata.isNil(): return err("Waku metadata already mounted, skipping") let metadata = WakuMetadata.new(clusterId, node.enr, node.topicSubscriptionQueue) - + for shard in shards: + metadata.shards.incl(uint32(shard)) node.wakuMetadata = metadata node.peerManager.wakuMetadata = metadata