mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-05 23:43:07 +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)
|
peerExchangeHandler = some(handlePeerExchange)
|
||||||
|
|
||||||
if conf.relay:
|
if conf.relay:
|
||||||
|
let pubsubTopics = conf.topics
|
||||||
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
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
await mountRelay(node, pubsubTopics, peerExchangeHandler = peerExchangeHandler)
|
await mountRelay(node, pubsubTopics, peerExchangeHandler = peerExchangeHandler)
|
||||||
except CatchableError:
|
except CatchableError:
|
||||||
|
|||||||
@ -215,11 +215,6 @@ type
|
|||||||
defaultValue: false
|
defaultValue: false
|
||||||
name: "keep-alive" }: bool
|
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* {.
|
topics* {.
|
||||||
desc: "Default topic to subscribe to. Argument may be repeated."
|
desc: "Default topic to subscribe to. Argument may be repeated."
|
||||||
defaultValue: @["/waku/2/default-waku/proto"]
|
defaultValue: @["/waku/2/default-waku/proto"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user