Change contentTopic to string (#463)

* Change contentTopic to string

* Missed a spot

* Try to fix Windows CI

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
This commit is contained in:
Hanno Cornelius
2021-04-08 17:55:19 +08:00
committed by GitHub
co-authored by Oskar Thorén
parent 139f148037
commit 5747ff5be0
19 changed files with 126 additions and 119 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ proc runBackground() {.async.} =
# Publish to a topic
let payload = cast[seq[byte]]("hello world")
let message = WakuMessage(payload: payload, contentTopic: ContentTopic(1))
let message = WakuMessage(payload: payload, contentTopic: ContentTopic("/waku/2/default-content/proto"))
await node.publish(topic, message)
# TODO Await with try/except here
+1 -2
View File
@@ -36,8 +36,7 @@ const
PayloadV1* {.booldefine.} = false
DefaultTopic = "/waku/2/default-waku/proto"
Dingpu = "dingpu".toBytes
DefaultContentTopic = ContentTopic(uint32.fromBytes(Dingpu))
DefaultContentTopic = ContentTopic("dingpu")
# XXX Connected is a bit annoying, because incoming connections don't trigger state change
# Could poll connection pool or something here, I suppose