Sleep and debug quicksim to get clearer view (#14)

This commit is contained in:
Oskar Thorén 2020-05-26 12:02:25 +08:00 committed by GitHub
parent b5006e482e
commit d68f6aedd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -39,6 +39,7 @@ proc handler(topic: string, data: seq[byte]) {.async, gcsafe.} =
# TODO: Implement handler logic
let res1 = waitFor node2.wakuSubscribe("foobar")
os.sleep(2000)
let res2 = waitFor node1.wakuPublish("foobar", "hello world")
os.sleep(2000)
info "Version is", version

View File

@ -59,7 +59,7 @@ method subscribeTopic*(w: WakuSub,
topic: string,
subscribe: bool,
peerId: string) {.gcsafe.} =
debug "subscribeTopic"
debug "subscribeTopic", topic=topic, subscribe=subscribe, peerId=peerId
procCall FloodSub(w).subscribeTopic(topic, subscribe, peerId)
method handleDisconnect*(w: WakuSub, peer: PubSubPeer) {.async.} =
@ -74,7 +74,7 @@ method rpcHandler*(w: WakuSub,
method publish*(w: WakuSub,
topic: string,
data: seq[byte]) {.async.} =
debug "publish"
debug "publish", topic=topic
await procCall FloodSub(w).publish(topic, data)
method unsubscribe*(w: WakuSub,