mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-16 09:55:07 +00:00
817b2e067a
* Add ligthpush payload tests. * Add end to end lightpush tests. * updating vendor/nim-unittest2 to protect against core dump issue * Enable "Valid Payload Sizes" test again --------- Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
34 lines
705 B
Nim
34 lines
705 B
Nim
{.used.}
|
|
|
|
import
|
|
std/options,
|
|
chronicles,
|
|
chronos,
|
|
libp2p/crypto/crypto
|
|
|
|
import
|
|
../../waku/node/peer_manager,
|
|
../../waku/waku_core,
|
|
../../waku/waku_lightpush,
|
|
../../waku/waku_lightpush/[client, common],
|
|
../testlib/[
|
|
common,
|
|
wakucore
|
|
]
|
|
|
|
|
|
proc newTestWakuLightpushNode*(switch: Switch, handler: PushMessageHandler): Future[WakuLightPush] {.async.} =
|
|
let
|
|
peerManager = PeerManager.new(switch)
|
|
proto = WakuLightPush.new(peerManager, rng, handler)
|
|
|
|
await proto.start()
|
|
switch.mount(proto)
|
|
|
|
return proto
|
|
|
|
|
|
proc newTestWakuLightpushClient*(switch: Switch): WakuLightPushClient =
|
|
let peerManager = PeerManager.new(switch)
|
|
WakuLightPushClient.new(peerManager, rng)
|