mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-07-25 22:13:12 +00:00
feature/start-protocol-command (#209)
* started working * fixes * rename start -> mount * started logging * mounting relay * Update wakunode2.nim * start of fixe * fix * fix * fixes * Update waku/node/v2/wakunode2.nim Co-authored-by: Oskar Thorén <ot@oskarthoren.com> * removed comment * fix * update * changed the default Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
This commit is contained in:
co-authored by
Oskar Thorén
parent
d6c48da071
commit
b2edfe8dda
@@ -25,6 +25,7 @@ proc runBackground() {.async.} =
|
||||
Port(uint16(conf.tcpPort) + conf.portsShift), extIp, extTcpPort)
|
||||
|
||||
await node.start()
|
||||
await node.mountRelay()
|
||||
|
||||
# Subscribe to a topic
|
||||
let topic = cast[Topic]("foobar")
|
||||
|
||||
@@ -160,10 +160,11 @@ proc processInput(rfd: AsyncFD, rng: ref BrHmacDrbgContext) {.async.} =
|
||||
Port(uint16(conf.tcpPort) + conf.portsShift),
|
||||
Port(uint16(conf.udpPort) + conf.portsShift))
|
||||
node = WakuNode.init(conf.nodeKey, conf.libp2pAddress,
|
||||
Port(uint16(conf.tcpPort) + conf.portsShift), extIp, extTcpPort, conf.topics.split(" "))
|
||||
Port(uint16(conf.tcpPort) + conf.portsShift), extIp, extTcpPort)
|
||||
|
||||
# waitFor vs await
|
||||
await node.start()
|
||||
await node.mountRelay(conf.topics.split(" "))
|
||||
|
||||
var chat = Chat(node: node, transp: transp, subscribed: true, connected: false, started: true)
|
||||
|
||||
@@ -175,6 +176,8 @@ proc processInput(rfd: AsyncFD, rng: ref BrHmacDrbgContext) {.async.} =
|
||||
echo &"Listening on\n {listenStr}"
|
||||
|
||||
if conf.storenode != "":
|
||||
node.mountStore()
|
||||
|
||||
node.wakuStore.setPeer(parsePeer(conf.storenode))
|
||||
|
||||
proc storeHandler(response: HistoryResponse) {.gcsafe.} =
|
||||
|
||||
Reference in New Issue
Block a user