mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-07-25 22:13:12 +00:00
Bump submodules (#363)
* Bump submodules * GossipSub refactor: Rem async from sub/unsub
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user