chore: remove peer-info usage

BREAKING CHANGE: all API methods with peer-info parameters or return values were changed. You can check the API.md document, in order to check the new values to use
This commit is contained in:
Vasco Santos
2020-04-14 14:05:30 +02:00
committed by Jacob Heun
parent ed6d5bb4b4
commit 12e48adafa
45 changed files with 608 additions and 695 deletions

View File

@ -74,7 +74,7 @@ describe('libp2p.metrics', () => {
remoteLibp2p.handle('/echo/1.0.0', ({ stream }) => pipe(stream, stream))
const connection = await libp2p.dial(remoteLibp2p.peerInfo)
const connection = await libp2p.dial(remoteLibp2p.peerId)
const { stream } = await connection.newStream('/echo/1.0.0')
const bytes = randomBytes(512)
@ -109,6 +109,11 @@ describe('libp2p.metrics', () => {
enabled: true,
computeThrottleMaxQueueSize: 1, // compute after every message
movingAverageIntervals: [10]
},
config: {
peerDiscovery: {
autoDial: false
}
}
}
let remoteLibp2p
@ -116,7 +121,7 @@ describe('libp2p.metrics', () => {
remoteLibp2p.handle('/echo/1.0.0', ({ stream }) => pipe(stream, stream))
const connection = await libp2p.dial(remoteLibp2p.peerInfo)
const connection = await libp2p.dial(remoteLibp2p.peerId)
const { stream } = await connection.newStream('/echo/1.0.0')
const bytes = randomBytes(512)