-
Notifications
You must be signed in to change notification settings - Fork 54
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: wakunode2 config. adding new 'topic' config parameter. #1727
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -42,7 +42,6 @@ type | |||
defaultValue: newSeq[ProtectedTopic](0) | ||||
name: "protected-topic" .}: seq[ProtectedTopic] | ||||
|
||||
|
||||
## Log configuration | ||||
logLevel* {. | ||||
desc: "Sets the log level for process. Supported levels: TRACE, DEBUG, INFO, NOTICE, WARN, ERROR or FATAL", | ||||
|
@@ -54,7 +53,6 @@ type | |||
defaultValue: logging.LogFormat.TEXT, | ||||
name: "log-format" .}: logging.LogFormat | ||||
|
||||
|
||||
## General node config | ||||
agentString* {. | ||||
defaultValue: "nwaku", | ||||
|
@@ -207,11 +205,16 @@ type | |||
defaultValue: false | ||||
name: "keep-alive" }: bool | ||||
|
||||
topics* {. | ||||
desc: "Default topics to subscribe to (space separated list)." | ||||
defaultValue: "/waku/2/default-waku/proto" | ||||
topicsDeprecated* {. | ||||
desc: "Default topics to subscribe to (space separated list). DEPRECATED: please use repeated --topic argument instead." | ||||
defaultValue: "" | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we keep the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh! Important point that I missed. @alrevuelta is right here. I think we should keep the default in both config options. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It shouldn't break because if nothing is specified, the default pubsub topic will get used. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you are right: Line 559 in 493f082
but perhaps a bit convoluted? can see you applied the changes thanks! |
||||
name: "topics" .}: string | ||||
|
||||
topics* {. | ||||
desc: "Default topic to subscribe to. Argument may be repeated." | ||||
defaultValue: @["/waku/2/default-waku/proto"] | ||||
name: "topic" .}: seq[string] | ||||
|
||||
## Store and message store config | ||||
|
||||
store* {. | ||||
|
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.
How about logging a warning if
conf.topicsDeprecated != ""
?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.
Good point! I'll add 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.
agree.
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.
Now, if
topicsDeprecated
is given, it prints awarn
. If bothtopicsDeprecated
andtopics
are given, then an error is returned and the execution is halted.