Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix: pass connection encryption module to libp2p
Browse files Browse the repository at this point in the history
Since the `v0.28.1` point release, libp2p now requires a connection
enryption module to be passed in config, otherwise it throws.

See: libp2p/js-libp2p#665
  • Loading branch information
achingbrain committed Jun 13, 2020
1 parent 6f94b24 commit 1edde75
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/ipfs/test/core/libp2p.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const PeerId = require('peer-id')
const Libp2p = require('libp2p')
const EE = require('events')
const libp2pComponent = require('../../src/core/components/libp2p')
const Crypto = require('libp2p-secio')

class DummyTransport {
get [Symbol.toStringTag] () {
Expand All @@ -32,7 +33,7 @@ class DummyDiscovery extends EE {
}
}

describe('libp2p customization', function () {
describe.only('libp2p customization', function () {
// Provide some extra time for ci since we're starting libp2p nodes in each test
this.timeout(25 * 1000)

Expand Down Expand Up @@ -77,7 +78,7 @@ describe('libp2p customization', function () {
libp2p: (opts) => {
return new Libp2p({
peerId: opts.peerId,
modules: { transport: [DummyTransport] },
modules: { transport: [DummyTransport], connEncryption: [ Crypto ] },
config: { relay: { enabled: false } }
})
}
Expand All @@ -101,7 +102,7 @@ describe('libp2p customization', function () {
libp2p: (opts) => {
return new Libp2p({
peerId: opts.peerId,
modules: { transport: [DummyTransport] },
modules: { transport: [DummyTransport], connEncryption: [ Crypto ] },
config: { relay: { enabled: false } }
})
}
Expand Down

0 comments on commit 1edde75

Please sign in to comment.