Skip to content

Commit

Permalink
Deprecation of the 'topics' param (#1806)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivansete-status authored Jun 20, 2023
1 parent 50412d1 commit 5d4fa3c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
13 changes: 1 addition & 12 deletions apps/wakunode2/app.nim
Original file line number Diff line number Diff line change
Expand Up @@ -502,18 +502,7 @@ proc setupProtocols(node: WakuNode, conf: WakuNodeConf,
peerExchangeHandler = some(handlePeerExchange)

if conf.relay:

var pubsubTopics = @[""]
if conf.topicsDeprecated != "/waku/2/default-waku/proto":
warn "The 'topics' parameter is deprecated. Better use the 'topic' one instead."
if conf.topics != @["/waku/2/default-waku/proto"]:
return err("Please don't specify 'topics' and 'topic' simultaneously. Only use the 'topic' parameter")

# This clause (if conf.topicsDeprecated ) should disapear in >= v0.18.0
pubsubTopics = conf.topicsDeprecated.split(" ")
else:
pubsubTopics = conf.topics

let pubsubTopics = conf.topics
try:
await mountRelay(node, pubsubTopics, peerExchangeHandler = peerExchangeHandler)
except CatchableError:
Expand Down
5 changes: 0 additions & 5 deletions apps/wakunode2/config.nim
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,6 @@ type
defaultValue: false
name: "keep-alive" }: bool

topicsDeprecated* {.
desc: "Default topics to subscribe to (space separated list). DEPRECATED: please use repeated --topic argument instead."
defaultValue: "/waku/2/default-waku/proto"
name: "topics" .}: string

topics* {.
desc: "Default topic to subscribe to. Argument may be repeated."
defaultValue: @["/waku/2/default-waku/proto"]
Expand Down

0 comments on commit 5d4fa3c

Please sign in to comment.