mirror of
https://github.com/waku-org/js-waku.git
synced 2025-02-05 00:55:30 +00:00
Pass truly async function to getPeers
, remove TODO (#428)
* Pass truly async function to `getPeers` * Confirmed nim-waku's RPC API only returned managed peers
This commit is contained in:
parent
41b7ef17e1
commit
e0949dab04
@ -29,8 +29,6 @@ describe('Waku Dial [node only]', function () {
|
||||
waku ? await waku.stop() : null;
|
||||
});
|
||||
|
||||
// TODO: Clarify whether nwaku's `get_waku_v2_admin_v1_peers` can be expected
|
||||
// to return peers with inbound connections.
|
||||
it.skip('js connects to nim', async function () {
|
||||
this.timeout(20_000);
|
||||
nimWaku = new NimWaku(makeLogFileName(this));
|
||||
@ -119,13 +117,12 @@ describe('Waku Dial [node only]', function () {
|
||||
|
||||
nimWaku = new NimWaku(makeLogFileName(this));
|
||||
await nimWaku.start();
|
||||
const multiAddrWithId = await nimWaku.getMultiaddrWithId();
|
||||
|
||||
waku = await Waku.create({
|
||||
staticNoiseKey: NOISE_KEY_1,
|
||||
bootstrap: {
|
||||
getPeers: async () => {
|
||||
return [multiAddrWithId];
|
||||
return [await nimWaku.getMultiaddrWithId()];
|
||||
},
|
||||
},
|
||||
});
|
||||
@ -136,6 +133,7 @@ describe('Waku Dial [node only]', function () {
|
||||
});
|
||||
});
|
||||
|
||||
const multiAddrWithId = await nimWaku.getMultiaddrWithId();
|
||||
expect(connectedPeerID.toB58String()).to.eq(multiAddrWithId.getPeerId());
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user