fix: static sharding setup (#3494)

This commit is contained in:
gabrielmer 2025-07-04 15:08:15 +02:00 committed by GitHub
parent 16bda047e1
commit c3991dbbc1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -127,8 +127,12 @@ proc setupAppCallbacks(
if node.wakuRelay.isNil():
return err("Cannot configure relayHandler callback without Relay mounted")
let autoShards = node.getAutoshards(conf.contentTopics).valueOr:
return err("Could not get autoshards: " & error)
let autoShards =
if node.wakuAutoSharding.isSome():
node.getAutoshards(conf.contentTopics).valueOr:
return err("Could not get autoshards: " & error)
else:
@[]
let confShards = conf.subscribeShards.mapIt(
RelayShard(clusterId: conf.clusterId, shardId: uint16(it))