-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix regresion + remove deprecated flag #2556
Conversation
waku/factory/internal_config.nim
Outdated
@@ -33,7 +33,7 @@ proc enrConfiguration*(conf: WakuNodeConf, netConfig: NetConfig, key: crypto.Pri | |||
|
|||
let shards: seq[uint16] = | |||
# no shards configured | |||
if conf.shards.len == 0: toSeq(0..<conf.topics.len).mapIt(uint16(it)) | |||
if conf.shards.len == 0: toSeq(0..<conf.pubsubTopics.len).mapIt(uint16(it)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was casing the regression. topics
was empty since its not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks! 💯
Just added minor question
waku/factory/node_factory.nim
Outdated
conf.pubsubTopics & shards | ||
else: | ||
conf.topics | ||
let shards = conf.contentTopics.mapIt(node.wakuSharding.getShard(it).expect("Valid Shard")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it crash if contentTopics
is empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, since mapIt
iterates over contentTopics
, if its empty, then there is nothing to iterate. so no crash :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sanity checked, lgtm
97bc62c
to
7725480
Compare
You can find the image built from this PR at
Built from 87aa0f0 |
7725480
to
b9d4c8f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
As soon as CI passes and we are sure that topics
can be removed.
topics* {. | ||
desc: | ||
"Default topic to subscribe to. Argument may be repeated. Deprecated! Please use pubsub-topic and/or content-topic instead.", | ||
defaultValue: @["/waku/2/default-waku/proto"], | ||
name: "topic" | ||
.}: seq[string] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would love to remove it but wasn't there someone still using this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the deprecation was announced many months ago.
Description
topics
. Deprecated long time ago in favour ofpubsubTopics
.topics
flag.