mirror of https://github.com/waku-org/nwaku.git
ffiixx
This commit is contained in:
parent
33aae34aa9
commit
13eae9c591
|
@ -32,16 +32,7 @@ proc enrConfiguration*(
|
||||||
let shards: seq[uint16] =
|
let shards: seq[uint16] =
|
||||||
# no shards configured
|
# no shards configured
|
||||||
if conf.shards.len == 0:
|
if conf.shards.len == 0:
|
||||||
var shardsLocal = newSeq[uint16]()
|
toSeq(0 ..< conf.pubsubTopics.len).mapIt(uint16(it))
|
||||||
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
|
|
||||||
|
|
||||||
# some shards configured
|
# some shards configured
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue