mirror of https://github.com/waku-org/js-waku.git
Wait for identify protocol to finish
This commit is contained in:
parent
00e303ee0a
commit
818a8256e7
|
@ -270,6 +270,16 @@ describe('Waku Relay', () => {
|
||||||
waku2.dial(nimWakuMultiaddr),
|
waku2.dial(nimWakuMultiaddr),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// Wait for identify protocol to finish
|
||||||
|
await Promise.all([
|
||||||
|
new Promise((resolve) =>
|
||||||
|
waku1.libp2p.peerStore.once('change:protocols', resolve)
|
||||||
|
),
|
||||||
|
new Promise((resolve) =>
|
||||||
|
waku2.libp2p.peerStore.once('change:protocols', resolve)
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
new Promise((resolve) =>
|
new Promise((resolve) =>
|
||||||
waku1.libp2p.pubsub.once('gossipsub:heartbeat', resolve)
|
waku1.libp2p.pubsub.once('gossipsub:heartbeat', resolve)
|
||||||
|
|
Loading…
Reference in New Issue