This commit is contained in:
Ivan Folgueira Bande 2024-06-10 19:33:08 +02:00
parent 33aae34aa9
commit 13eae9c591
No known key found for this signature in database
GPG Key ID: 3C117481F89E24A7
1 changed files with 1 additions and 10 deletions

View File

@ -32,16 +32,7 @@ proc enrConfiguration*(
let shards: seq[uint16] =
# no shards configured
if conf.shards.len == 0:
var shardsLocal = newSeq[uint16]()
let shardsRes = topicsToRelayShards(conf.pubsubTopics)
if shardsRes.isOk() and shardsRes.get().isSome():
shardsLocal = shardsRes.get().get().shardIds
elif shardsRes.get().isNone():
info "no pubsub topics specified or pubsubtopic is of type Named sharding "
else:
error "failed to parse pubsub topic, please format according to static shard specification",
error = shardsRes.error
shardsLocal
toSeq(0 ..< conf.pubsubTopics.len).mapIt(uint16(it))
# some shards configured
else: