Bump submodules (#363)

* Bump submodules

* GossipSub refactor: Rem async from sub/unsub
This commit is contained in:
Hanno Cornelius
2021-02-02 13:33:59 +02:00
committed by GitHub
parent 886b458ff5
commit 41fe4395a8
30 changed files with 80 additions and 102 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ proc runBackground() {.async.} =
Port(uint16(conf.tcpPort) + conf.portsShift), extIp, extTcpPort)
await node.start()
await node.mountRelay(rlnRelayEnabled = conf.rlnrelay)
node.mountRelay(rlnRelayEnabled = conf.rlnrelay)
# Subscribe to a topic
let topic = cast[Topic]("foobar")
@@ -31,7 +31,7 @@ proc runBackground() {.async.} =
let message = WakuMessage.init(data).value
let payload = cast[string](message.payload)
info "Hit subscribe handler", topic=topic, payload=payload, contentTopic=message.contentTopic
await node.subscribe(topic, handler)
node.subscribe(topic, handler)
# Publish to a topic
let payload = cast[seq[byte]]("hello world")
+3 -3
View File
@@ -176,9 +176,9 @@ proc processInput(rfd: AsyncFD, rng: ref BrHmacDrbgContext) {.async.} =
await node.start()
if conf.filternode != "":
await node.mountRelay(conf.topics.split(" "), rlnRelayEnabled = conf.rlnrelay)
node.mountRelay(conf.topics.split(" "), rlnRelayEnabled = conf.rlnrelay)
else:
await node.mountRelay(@[], rlnRelayEnabled = conf.rlnrelay)
node.mountRelay(@[], rlnRelayEnabled = conf.rlnrelay)
var chat = Chat(node: node, transp: transp, subscribed: true, connected: false, started: true)
@@ -251,7 +251,7 @@ proc processInput(rfd: AsyncFD, rng: ref BrHmacDrbgContext) {.async.} =
trace "Invalid encoded WakuMessage", error = decoded.error
let topic = cast[Topic](DefaultTopic)
await node.subscribe(topic, handler)
node.subscribe(topic, handler)
await chat.readWriteLoop()
runForever()