mirror of
https://github.com/waku-org/nwaku.git
synced 2025-02-05 11:34:45 +00:00
Deprecation of the 'topics' param (#1806)
This commit is contained in:
parent
50412d1880
commit
5d4fa3ce73
@ -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:
|
||||
|
@ -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"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user