Skip to content
This repository was archived by the owner on Jul 21, 2023. It is now read-only.

Commit e70a172

Browse files
authored
chore: update dependencies (#71)
1 parent 323da51 commit e70a172

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"libp2p-record": "~0.6.1",
5151
"multihashes": "~0.4.14",
5252
"multihashing-async": "~0.5.1",
53-
"peer-id": "~0.11.0",
53+
"peer-id": "~0.12.1",
5454
"peer-info": "~0.15.0",
5555
"priorityqueue": "~0.2.1",
5656
"protons": "^1.0.1",

test/kad-dht.spec.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ const retry = require('async/retry')
1313
const each = require('async/each')
1414
const waterfall = require('async/waterfall')
1515
const random = require('lodash.random')
16-
const _ = require('lodash')
1716
const Record = require('libp2p-record').Record
17+
const PeerId = require('peer-id')
18+
const PeerInfo = require('peer-info')
1819
const PeerBook = require('peer-book')
1920
const Switch = require('libp2p-switch')
2021
const TCP = require('libp2p-tcp')
@@ -32,9 +33,9 @@ const TestDHT = require('./utils/test-dht')
3233

3334
// connect two dhts
3435
function connectNoSync (a, b, callback) {
35-
const target = _.cloneDeep(b.peerInfo)
36-
target.id._pubKey = target.id.pubKey
37-
target.id._privKey = null
36+
const publicPeerId = new PeerId(b.peerInfo.id.id, null, b.peerInfo.id.pubKey)
37+
const target = new PeerInfo(publicPeerId)
38+
target.multiaddrs = b.peerInfo.multiaddrs
3839
a.switch.dial(target, callback)
3940
}
4041

0 commit comments

Comments
 (0)