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

@ -32,11 +32,13 @@ describe('DHT subsystem is configurable', () => {
})
it('should start and stop by default once libp2p starts', async () => {
const [peerInfo] = await peerUtils.createPeerInfo(1)
peerInfo.multiaddrs.add(listenAddr)
const [peerId] = await peerUtils.createPeerId(1)
const customOptions = mergeOptions(subsystemOptions, {
peerInfo
peerId,
addresses: {
listen: [listenAddr]
}
})
libp2p = await create(customOptions)
@ -50,11 +52,13 @@ describe('DHT subsystem is configurable', () => {
})
it('should not start if disabled once libp2p starts', async () => {
const [peerInfo] = await peerUtils.createPeerInfo(1)
peerInfo.multiaddrs.add(listenAddr)
const [peerId] = await peerUtils.createPeerId(1)
const customOptions = mergeOptions(subsystemOptions, {
peerInfo,
peerId,
addresses: {
listen: [listenAddr]
},
config: {
dht: {
enabled: false
@ -70,11 +74,13 @@ describe('DHT subsystem is configurable', () => {
})
it('should allow a manual start', async () => {
const [peerInfo] = await peerUtils.createPeerInfo(1)
peerInfo.multiaddrs.add(listenAddr)
const [peerId] = await peerUtils.createPeerId(1)
const customOptions = mergeOptions(subsystemOptions, {
peerInfo,
peerId,
addresses: {
listen: [listenAddr]
},
config: {
dht: {
enabled: false