mirror of
https://github.com/waku-org/nwaku.git
synced 2025-02-04 02:56:05 +00:00
SIGSERV failing isolateed a bit more
This commit is contained in:
parent
2e9c2ed949
commit
c6bd02ba38
@ -8,8 +8,8 @@ import
|
||||
libp2p/transports/[transport, tcptransport],
|
||||
libp2p/muxers/[muxer, mplex/mplex, mplex/types],
|
||||
libp2p/protocols/[identify, secure/secure],
|
||||
libp2p/protocols/pubsub/[pubsub, gossipsub, floodsub]
|
||||
# waku_protocol
|
||||
libp2p/protocols/pubsub/[pubsub, gossipsub, floodsub],
|
||||
../../waku/protocol/v2/waku_protocol
|
||||
|
||||
when libp2p_secure == "noise":
|
||||
import libp2p/protocols/secure/noise
|
||||
@ -42,6 +42,7 @@ proc newStandardSwitch*(privKey = none(PrivateKey),
|
||||
else:
|
||||
# Creating switch from generate node
|
||||
# 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)
|
||||
|
@ -15,11 +15,8 @@ import utils,
|
||||
connection,
|
||||
stream/bufferstream,
|
||||
crypto/crypto,
|
||||
#protocols/pubsub/pubsub,
|
||||
protocols/pubsub/floodsub,
|
||||
#protocols/pubsub/rpc/messages,
|
||||
#protocols/pubsub/rpc/message
|
||||
]
|
||||
protocols/pubsub/floodsub]
|
||||
import ../../waku/protocol/v2/waku_protocol
|
||||
|
||||
const
|
||||
StreamTransportTrackerName = "stream.transport"
|
||||
@ -27,6 +24,7 @@ const
|
||||
|
||||
# TODO: Start with floodsub here, then move other logic here
|
||||
|
||||
# XXX: If I cast to WakuSub here I get a SIGSEGV
|
||||
proc waitSub(sender, receiver: auto; key: string) {.async, gcsafe.} =
|
||||
# turn things deterministic
|
||||
# this is for testing purposes only
|
||||
@ -57,6 +55,7 @@ suite "FloodSub":
|
||||
proc runTests(): Future[bool] {.async.} =
|
||||
var completionFut = newFuture[bool]()
|
||||
proc handler(topic: string, data: seq[byte]) {.async, gcsafe.} =
|
||||
echo "Hit handler", topic
|
||||
check topic == "foobar"
|
||||
completionFut.complete(true)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user