chore: refactor connection manager and registrar

This commit is contained in:
Vasco Santos
2020-04-18 17:06:56 +02:00
committed by Jacob Heun
parent d33919d0b3
commit d3a4bf0a3f
18 changed files with 424 additions and 411 deletions

View File

@ -374,8 +374,8 @@ describe('Dialing (direct, TCP)', () => {
}
// 1 connection, because we know the peer in the multiaddr
expect(libp2p.connectionManager._connections.size).to.equal(1)
expect(remoteLibp2p.connectionManager._connections.size).to.equal(1)
expect(libp2p.connectionManager.size).to.equal(1)
expect(remoteLibp2p.connectionManager.size).to.equal(1)
})
it('should coalesce parallel dials to the same error on failure', async () => {
@ -409,8 +409,8 @@ describe('Dialing (direct, TCP)', () => {
}
// 1 connection, because we know the peer in the multiaddr
expect(libp2p.connectionManager._connections.size).to.equal(0)
expect(remoteLibp2p.connectionManager._connections.size).to.equal(0)
expect(libp2p.connectionManager.size).to.equal(0)
expect(remoteLibp2p.connectionManager.size).to.equal(0)
})
})
})