Skip to content

Commit 6cb2770

Browse files
committed
fix: pubsub constructor breaking change
1 parent 13ad08b commit 6cb2770

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"aegir": "^30.0.1",
4242
"detect-node": "^2.0.4",
4343
"it-pair": "^1.0.0",
44+
"libp2p": "^0.30.9",
4445
"libp2p-gossipsub": "^0.8.0",
4546
"libp2p-record": "^0.10.0",
4647
"p-wait-for": "^3.1.0",

test/utils.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@ const createMockRegistrar = (registrarRecord) => ({
3434
// as created by libp2p
3535
exports.createPubsubNode = async (registrarRecord) => {
3636
const peerId = await PeerId.create({ bits: 1024 })
37-
const pubsub = new Pubsub(peerId, createMockRegistrar(registrarRecord))
37+
const libp2p = {
38+
peerId,
39+
registrar: createMockRegistrar(registrarRecord),
40+
connectionManager: {
41+
getAll: () => []
42+
}
43+
}
44+
const pubsub = new Pubsub(libp2p)
3845

3946
await pubsub.start()
4047

0 commit comments

Comments
 (0)