orbitdb/test/utils/connect-peers.js
haad 3318b6a6d9 Use ipfsd-ctl to create test IPFS instances
Fix default database creation tests
Add more test utils
Remove obsolete public methods from OrbitDB
Workaround for "underlying socket has been closed" error in replication test
Update package-lock
2018-03-27 14:30:45 +02:00

11 lines
256 B
JavaScript

'use strict'
const connectIpfsNodes = async (ipfs1, ipfs2) => {
const id1 = await ipfs1.id()
const id2 = await ipfs2.id()
await ipfs1.swarm.connect(id2.addresses[0])
await ipfs2.swarm.connect(id1.addresses[0])
}
module.exports = connectIpfsNodes