mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-24 14:31:35 +00:00
fix: discovery mechanism examples not working (#1365)
Co-authored-by: achingbrain <alex@achingbrain.net>- fixed tests that were passing even though the example isn't working - added timeouts to avoid infinite wait Fixes #1229
This commit is contained in:
@ -67,7 +67,7 @@ const createNode = async (bootstrappers) => {
|
||||
const peer = evt.detail
|
||||
console.log(`Peer ${node1.peerId.toString()} discovered: ${peer.id.toString()}`)
|
||||
})
|
||||
node2.addEventListener('peer:discovery',(evt) => {
|
||||
node2.addEventListener('peer:discovery', (evt) => {
|
||||
const peer = evt.detail
|
||||
console.log(`Peer ${node2.peerId.toString()} discovered: ${peer.id.toString()}`)
|
||||
})
|
||||
@ -77,4 +77,4 @@ const createNode = async (bootstrappers) => {
|
||||
node1.start(),
|
||||
node2.start()
|
||||
])
|
||||
})();
|
||||
})()
|
||||
|
Reference in New Issue
Block a user