Fails with SIGSERV

This commit is contained in:
Oskar Thoren 2020-05-14 11:18:20 +08:00
parent 5e50c6a225
commit 550556bb97
No known key found for this signature in database
GPG Key ID: B2ECCFD3BC2EF77E
2 changed files with 4 additions and 3 deletions

View File

@ -44,8 +44,8 @@ proc newStandardSwitch*(privKey = none(PrivateKey),
# XXX: Hacky test, hijacking WakuSub here
# XXX: If I use WakuSub here I get a SIGSERV
#echo "Using WakuSub here"
PubSub newPubSub(FloodSub, peerInfo, triggerSelf)
#PubSub newPubSub(WakuSub, peerInfo, triggerSelf)
#PubSub newPubSub(FloodSub, peerInfo, triggerSelf)
PubSub newPubSub(WakuSub, peerInfo, triggerSelf)
result = newSwitch(peerInfo,
transports,

View File

@ -29,7 +29,8 @@ proc waitSub(sender, receiver: auto; key: string) {.async, gcsafe.} =
# turn things deterministic
# this is for testing purposes only
var ceil = 15
let fsub = cast[FloodSub](sender.pubSub.get())
#echo "isa thing", repr(sender.pubSub.get())
let fsub = cast[WakuSub](sender.pubSub.get())
while not fsub.floodsub.hasKey(key) or
not fsub.floodsub[key].contains(receiver.peerInfo.id):
await sleepAsync(100.millis)