-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Ivan FB <[email protected]> Co-authored-by: Prem Chaitanya Prathi <[email protected]>
- Loading branch information
1 parent
cee020f
commit d76b3d0
Showing
16 changed files
with
1,392 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{.used.} | ||
|
||
import std/options, chronos, chronicles, libp2p/crypto/crypto | ||
|
||
import | ||
../../../waku/[node/peer_manager, waku_core, waku_sync], ../testlib/[common, wakucore] | ||
|
||
proc newTestWakuSync*( | ||
switch: Switch, handler: WakuSyncCallback | ||
): Future[WakuSync] {.async.} = | ||
const DefaultFrameSize = 153600 | ||
let | ||
peerManager = PeerManager.new(switch) | ||
proto = WakuSync.new(peerManager, DefaultFrameSize, 0.seconds, some(handler)) | ||
assert proto != nil | ||
|
||
proto.start() | ||
switch.mount(proto) | ||
|
||
return proto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{.used.} | ||
|
||
import | ||
./test_protocol |
Oops, something went wrong.