mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-06 16:03:08 +00:00
Sleep and debug quicksim to get clearer view (#14)
This commit is contained in:
parent
b5006e482e
commit
d68f6aedd2
@ -39,6 +39,7 @@ proc handler(topic: string, data: seq[byte]) {.async, gcsafe.} =
|
|||||||
|
|
||||||
# TODO: Implement handler logic
|
# TODO: Implement handler logic
|
||||||
let res1 = waitFor node2.wakuSubscribe("foobar")
|
let res1 = waitFor node2.wakuSubscribe("foobar")
|
||||||
|
os.sleep(2000)
|
||||||
let res2 = waitFor node1.wakuPublish("foobar", "hello world")
|
let res2 = waitFor node1.wakuPublish("foobar", "hello world")
|
||||||
|
os.sleep(2000)
|
||||||
info "Version is", version
|
info "Version is", version
|
||||||
|
|||||||
@ -59,7 +59,7 @@ method subscribeTopic*(w: WakuSub,
|
|||||||
topic: string,
|
topic: string,
|
||||||
subscribe: bool,
|
subscribe: bool,
|
||||||
peerId: string) {.gcsafe.} =
|
peerId: string) {.gcsafe.} =
|
||||||
debug "subscribeTopic"
|
debug "subscribeTopic", topic=topic, subscribe=subscribe, peerId=peerId
|
||||||
procCall FloodSub(w).subscribeTopic(topic, subscribe, peerId)
|
procCall FloodSub(w).subscribeTopic(topic, subscribe, peerId)
|
||||||
|
|
||||||
method handleDisconnect*(w: WakuSub, peer: PubSubPeer) {.async.} =
|
method handleDisconnect*(w: WakuSub, peer: PubSubPeer) {.async.} =
|
||||||
@ -74,7 +74,7 @@ method rpcHandler*(w: WakuSub,
|
|||||||
method publish*(w: WakuSub,
|
method publish*(w: WakuSub,
|
||||||
topic: string,
|
topic: string,
|
||||||
data: seq[byte]) {.async.} =
|
data: seq[byte]) {.async.} =
|
||||||
debug "publish"
|
debug "publish", topic=topic
|
||||||
await procCall FloodSub(w).publish(topic, data)
|
await procCall FloodSub(w).publish(topic, data)
|
||||||
|
|
||||||
method unsubscribe*(w: WakuSub,
|
method unsubscribe*(w: WakuSub,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user