chore: rename address functions and apply suggestions from code review

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>
This commit is contained in:
Vasco Santos
2020-04-28 16:21:25 +02:00
parent 52f45d0319
commit beb6b8090d
19 changed files with 78 additions and 119 deletions

View File

@ -155,13 +155,13 @@ describe('Dialing (via relay, TCP)', () => {
// Connect the destination peer and the relay
const tcpAddrs = dstLibp2p.transportManager.getAddrs()
sinon.stub(dstLibp2p.addressManager, 'getListenMultiaddrs').returns([multiaddr(`${relayAddr}/p2p-circuit`)])
sinon.stub(dstLibp2p.addressManager, 'getListenAddrs').returns([multiaddr(`${relayAddr}/p2p-circuit`)])
await dstLibp2p.transportManager.listen()
expect(dstLibp2p.transportManager.getAddrs()).to.have.deep.members([...tcpAddrs, dialAddr.decapsulate('p2p')])
// Tamper with the our multiaddrs for the circuit message
sinon.stub(srcLibp2p.addressManager, 'getListenMultiaddrs').returns([{
sinon.stub(srcLibp2p.addressManager, 'getListenAddrs').returns([{
buffer: Buffer.from('an invalid multiaddr')
}])