mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-07-08 05:11:33 +00:00
Compare commits
31 Commits
Author | SHA1 | Date | |
---|---|---|---|
ba275558bb | |||
9b32d25de9 | |||
3c16dbe93e | |||
2dbcc4b126 | |||
27481e7edc | |||
aa199362c2 | |||
3694e02eaa | |||
b216471f44 | |||
10f4cb969d | |||
f3fd734a2a | |||
28d915ebb6 | |||
fb59bf2bf5 | |||
d0ae8b6267 | |||
4b01fbebf9 | |||
4f095a0543 | |||
aba09a4f30 | |||
90e88742b0 | |||
fc492c6739 | |||
21d74401ed | |||
d5374f0167 | |||
f73fe2502b | |||
2d6c0ed3f7 | |||
ae0cd81ed9 | |||
4ac25c9f32 | |||
52fdf7b40c | |||
8ca5f60f42 | |||
b8f77ea5ed | |||
7e6f3f2e22 | |||
f9a35dd8a4 | |||
a2d2c953bc | |||
e836bb7ff0 |
42
.gitignore
vendored
42
.gitignore
vendored
@ -1,33 +1,13 @@
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
docs
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directory
|
||||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
|
||||
node_modules
|
||||
|
||||
|
||||
coverage
|
||||
|
||||
**/node_modules
|
||||
**/*.log
|
||||
test/setup/tmp-disposable-nodes-addrs.json
|
||||
dist
|
||||
coverage
|
||||
**/*.swp
|
||||
examples/sub-module/**/bundle.js
|
||||
examples/sub-module/**/*-minified.js
|
||||
examples/sub-module/*-bundle.js
|
||||
|
36
.travis.yml
36
.travis.yml
@ -1,36 +0,0 @@
|
||||
sudo: false
|
||||
language: node_js
|
||||
matrix:
|
||||
include:
|
||||
- node_js: 4
|
||||
env: CXX=g++-4.8
|
||||
- node_js: 6
|
||||
env:
|
||||
- SAUCE=true
|
||||
- CXX=g++-4.8
|
||||
- node_js: stable
|
||||
env: CXX=g++-4.8
|
||||
|
||||
# Make sure we have new NPM.
|
||||
before_install:
|
||||
- npm install -g npm
|
||||
|
||||
script:
|
||||
- npm run lint
|
||||
- npm test
|
||||
- npm run coverage
|
||||
|
||||
before_script:
|
||||
- export DISPLAY=:99.0
|
||||
- sh -e /etc/init.d/xvfb start
|
||||
|
||||
after_success:
|
||||
- npm run coverage-publish
|
||||
|
||||
addons:
|
||||
firefox: 'latest'
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-4.8
|
136
CHANGELOG.md
Normal file
136
CHANGELOG.md
Normal file
@ -0,0 +1,136 @@
|
||||
<a name="0.7.3"></a>
|
||||
## [0.7.3](https://github.com/libp2p/js-libp2p-identify/compare/v0.7.2...v0.7.3) (2018-11-26)
|
||||
|
||||
|
||||
|
||||
<a name="0.7.2"></a>
|
||||
## [0.7.2](https://github.com/libp2p/js-libp2p-identify/compare/v0.7.1...v0.7.2) (2018-07-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add the ability to verify expected peer data ([aa19936](https://github.com/libp2p/js-libp2p-identify/commit/aa19936))
|
||||
|
||||
|
||||
|
||||
<a name="0.7.1"></a>
|
||||
## [0.7.1](https://github.com/libp2p/js-libp2p-identify/compare/v0.7.0...v0.7.1) (2018-04-30)
|
||||
|
||||
|
||||
|
||||
<a name="0.7.0"></a>
|
||||
# [0.7.0](https://github.com/libp2p/js-libp2p-identify/compare/v0.6.3...v0.7.0) (2018-04-05)
|
||||
|
||||
|
||||
|
||||
<a name="0.6.3"></a>
|
||||
## [0.6.3](https://github.com/libp2p/js-libp2p-identify/compare/v0.6.2...v0.6.3) (2018-01-28)
|
||||
|
||||
|
||||
|
||||
<a name="0.6.2"></a>
|
||||
## [0.6.2](https://github.com/libp2p/js-libp2p-identify/compare/v0.6.1...v0.6.2) (2018-01-07)
|
||||
|
||||
|
||||
|
||||
<a name="0.6.1"></a>
|
||||
## [0.6.1](https://github.com/libp2p/js-libp2p-identify/compare/v0.6.0...v0.6.1) (2017-09-07)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* replace protocol-buffers with protons ([#42](https://github.com/libp2p/js-libp2p-identify/issues/42)) ([4ac25c9](https://github.com/libp2p/js-libp2p-identify/commit/4ac25c9))
|
||||
|
||||
|
||||
|
||||
<a name="0.6.0"></a>
|
||||
# [0.6.0](https://github.com/libp2p/js-libp2p-identify/compare/v0.5.0...v0.6.0) (2017-09-03)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* p2p addrs situation ([#41](https://github.com/libp2p/js-libp2p-identify/issues/41)) ([b8f77ea](https://github.com/libp2p/js-libp2p-identify/commit/b8f77ea))
|
||||
|
||||
|
||||
|
||||
<a name="0.5.0"></a>
|
||||
# [0.5.0](https://github.com/libp2p/js-libp2p-identify/compare/v0.4.2...v0.5.0) (2017-07-22)
|
||||
|
||||
|
||||
|
||||
<a name="0.4.2"></a>
|
||||
## [0.4.2](https://github.com/libp2p/js-libp2p-identify/compare/v0.4.1...v0.4.2) (2017-07-08)
|
||||
|
||||
|
||||
|
||||
<a name="0.4.1"></a>
|
||||
## [0.4.1](https://github.com/libp2p/js-libp2p-identify/compare/v0.4.0...v0.4.1) (2017-04-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* if conn was closed, don't crash just because identify didn't get any data ([#40](https://github.com/libp2p/js-libp2p-identify/issues/40)) ([bb6d3df](https://github.com/libp2p/js-libp2p-identify/commit/bb6d3df))
|
||||
|
||||
|
||||
|
||||
<a name="0.4.0"></a>
|
||||
# [0.4.0](https://github.com/libp2p/js-libp2p-identify/compare/v0.3.3...v0.4.0) (2017-03-30)
|
||||
|
||||
|
||||
|
||||
<a name="0.3.3"></a>
|
||||
## [0.3.3](https://github.com/libp2p/js-libp2p-identify/compare/v0.3.2...v0.3.3) (2017-03-21)
|
||||
|
||||
|
||||
|
||||
<a name="0.3.2"></a>
|
||||
## [0.3.2](https://github.com/libp2p/js-libp2p-identify/compare/v0.3.1...v0.3.2) (2017-02-09)
|
||||
|
||||
|
||||
|
||||
<a name="0.3.1"></a>
|
||||
## [0.3.1](https://github.com/libp2p/js-libp2p-identify/compare/v0.3.0...v0.3.1) (2017-01-11)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* remove deprecation notice from identify protobuf ([38171cd](https://github.com/libp2p/js-libp2p-identify/commit/38171cd))
|
||||
|
||||
|
||||
|
||||
<a name="0.3.0"></a>
|
||||
# [0.3.0](https://github.com/libp2p/js-libp2p-identify/compare/v0.2.0...v0.3.0) (2016-11-03)
|
||||
|
||||
|
||||
|
||||
<a name="0.2.0"></a>
|
||||
# [0.2.0](https://github.com/libp2p/js-libp2p-identify/compare/v0.1.3...v0.2.0) (2016-09-06)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **api:** move to pull-streams ([3b751c2](https://github.com/libp2p/js-libp2p-identify/commit/3b751c2))
|
||||
* **readme:** documentationa and cleanup of code ([82bc0f2](https://github.com/libp2p/js-libp2p-identify/commit/82bc0f2))
|
||||
|
||||
|
||||
|
||||
<a name="0.1.3"></a>
|
||||
## [0.1.3](https://github.com/libp2p/js-libp2p-identify/compare/v0.1.2...v0.1.3) (2016-08-03)
|
||||
|
||||
|
||||
|
||||
<a name="0.1.2"></a>
|
||||
## [0.1.2](https://github.com/libp2p/js-libp2p-identify/compare/v0.1.1...v0.1.2) (2016-06-27)
|
||||
|
||||
|
||||
|
||||
<a name="0.1.1"></a>
|
||||
## [0.1.1](https://github.com/libp2p/js-libp2p-identify/compare/v0.1.0...v0.1.1) (2016-06-27)
|
||||
|
||||
|
||||
|
||||
<a name="0.1.0"></a>
|
||||
# 0.1.0 (2016-06-27)
|
||||
|
||||
|
||||
|
13
README.md
13
README.md
@ -6,17 +6,20 @@
|
||||
[](https://coveralls.io/github/libp2p/js-libp2p-identify?branch=master)
|
||||
[](https://travis-ci.org/libp2p/js-libp2p-identify)
|
||||
[](https://circleci.com/gh/libp2p/js-libp2p-identify)
|
||||
[](https://david-dm.org/libp2p/js-libp2p-identify) [](https://github.com/feross/standard)
|
||||
[](https://david-dm.org/libp2p/js-libp2p-identify)
|
||||
[](https://github.com/feross/standard)
|
||||

|
||||

|
||||
|
||||
[](https://saucelabs.com/u/libp2p-js-identify)
|
||||

|
||||
|
||||
> libp2p Identify Protocol
|
||||
|
||||
## Lead Maintainer
|
||||
|
||||
[Jacob Heun](https://github.com/jacobheun)
|
||||
|
||||
## Description
|
||||
|
||||
Identify is a STUN protocol, used by libp2p-swarmin order to broadcast and learn about the `ip:port` pairs a specific peer is available through and to know when a new stream muxer is established, so a conn can be reused.
|
||||
Identify is a STUN protocol, used by libp2p-swarm in order to broadcast and learn about the `ip:port` pairs a specific peer is available through and to know when a new stream muxer is established, so a conn can be reused.
|
||||
|
||||
## How does it work
|
||||
|
||||
|
2
ci/Jenkinsfile
vendored
Normal file
2
ci/Jenkinsfile
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
// Warning: This file is automatically synced from https://github.com/ipfs/ci-sync so if you want to change it, please change it there and ask someone to sync all repositories.
|
||||
javascript()
|
13
circle.yml
13
circle.yml
@ -1,13 +0,0 @@
|
||||
|
||||
machine:
|
||||
node:
|
||||
version: stable
|
||||
|
||||
dependencies:
|
||||
pre:
|
||||
- google-chrome --version
|
||||
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
|
||||
- sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
|
||||
- sudo apt-get update
|
||||
- sudo apt-get --only-upgrade install google-chrome-stable
|
||||
- google-chrome --version
|
54
package.json
54
package.json
@ -1,26 +1,27 @@
|
||||
{
|
||||
"name": "libp2p-identify",
|
||||
"version": "0.4.2",
|
||||
"version": "0.7.3",
|
||||
"description": "libp2p Identify Protocol",
|
||||
"leadMaintainer": "Jacob Heun <jacobheun@gmail.com>",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
"lint": "aegir-lint",
|
||||
"build": "aegir-build",
|
||||
"test": "aegir-test",
|
||||
"test:node": "aegir-test --env node",
|
||||
"test:browser": "aegir-test --env browser",
|
||||
"release": "aegir-release",
|
||||
"release-minor": "aegir-release --type minor",
|
||||
"release-major": "aegir-release --type major",
|
||||
"coverage": "aegir-coverage",
|
||||
"coverage-publish": "aegir-coverage publish"
|
||||
"lint": "aegir lint",
|
||||
"build": "aegir build",
|
||||
"test": "aegir test",
|
||||
"test:node": "aegir test -t node",
|
||||
"test:browser": "aegir test -t browser",
|
||||
"release": "aegir release",
|
||||
"release-minor": "aegir release --type minor",
|
||||
"release-major": "aegir release --type major",
|
||||
"coverage": "aegir coverage"
|
||||
},
|
||||
"pre-commit": [
|
||||
"pre-push": [
|
||||
"lint",
|
||||
"test"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
"node": ">=6.0.0",
|
||||
"npm": ">=3.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -30,31 +31,34 @@
|
||||
"IPFS",
|
||||
"libp2p"
|
||||
],
|
||||
"author": "David Dias <daviddias@ipfs.io>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/libp2p/js-libp2p-identify/issues"
|
||||
},
|
||||
"homepage": "https://github.com/libp2p/js-libp2p-identify#readme",
|
||||
"devDependencies": {
|
||||
"aegir": "^11.0.2",
|
||||
"chai": "^4.0.2",
|
||||
"dirty-chai": "^2.0.0",
|
||||
"pre-commit": "^1.2.2",
|
||||
"aegir": "^17.1.1",
|
||||
"chai": "^4.2.0",
|
||||
"dirty-chai": "^2.0.1",
|
||||
"pull-pair": "^1.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"multiaddr": "^2.3.0",
|
||||
"peer-id": "~0.8.7",
|
||||
"peer-info": "~0.9.2",
|
||||
"protocol-buffers": "^3.2.1",
|
||||
"multiaddr": "^5.0.2",
|
||||
"peer-id": "~0.12.0",
|
||||
"peer-info": "~0.14.1",
|
||||
"protons": "^1.0.1",
|
||||
"pull-length-prefixed": "^1.3.0",
|
||||
"pull-stream": "^3.6.0"
|
||||
"pull-stream": "^3.6.9"
|
||||
},
|
||||
"contributors": [
|
||||
"David Dias <daviddias.p@gmail.com>",
|
||||
"Friedel Ziegelmayer <dignifiedquire@gmail.com>",
|
||||
"Greenkeeper <support@greenkeeper.io>",
|
||||
"Richard Littauer <richard.littauer@gmail.com>"
|
||||
"Jacob Heun <jacobheun@gmail.com>",
|
||||
"Jacob Heun <jake@andyet.net>",
|
||||
"Maciej Krüger <mkg20001@gmail.com>",
|
||||
"Richard Littauer <richard.littauer@gmail.com>",
|
||||
"Vasco Santos <vasco.santos@moxy.studio>",
|
||||
"ᴠɪᴄᴛᴏʀ ʙᴊᴇʟᴋʜᴏʟᴍ <victorbjelkholm@gmail.com>"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,13 @@ const lp = require('pull-length-prefixed')
|
||||
|
||||
const msg = require('./message')
|
||||
|
||||
module.exports = (conn, callback) => {
|
||||
module.exports = (conn, expectedPeerInfo, callback) => {
|
||||
if (typeof expectedPeerInfo === 'function') {
|
||||
callback = expectedPeerInfo
|
||||
expectedPeerInfo = null
|
||||
console.warn('WARNING: no expected peer info was given, identify will not be able to verify peer integrity')
|
||||
}
|
||||
|
||||
pull(
|
||||
conn,
|
||||
lp.decode(),
|
||||
@ -30,11 +36,27 @@ module.exports = (conn, callback) => {
|
||||
}
|
||||
|
||||
const peerInfo = new PeerInfo(id)
|
||||
input.listenAddrs
|
||||
.map(multiaddr)
|
||||
.forEach((ma) => peerInfo.multiaddrs.add(ma))
|
||||
if (expectedPeerInfo && expectedPeerInfo.id.toB58String() !== id.toB58String()) {
|
||||
return callback(new Error('invalid peer'))
|
||||
}
|
||||
|
||||
callback(null, peerInfo, getObservedAddrs(input))
|
||||
try {
|
||||
input.listenAddrs
|
||||
.map(multiaddr)
|
||||
.forEach((ma) => peerInfo.multiaddrs.add(ma))
|
||||
} catch (err) {
|
||||
return callback(err)
|
||||
}
|
||||
|
||||
let observedAddr
|
||||
|
||||
try {
|
||||
observedAddr = getObservedAddrs(input)
|
||||
} catch (err) {
|
||||
return callback(err)
|
||||
}
|
||||
|
||||
callback(null, peerInfo, observedAddr)
|
||||
})
|
||||
})
|
||||
)
|
||||
@ -47,7 +69,7 @@ function getObservedAddrs (input) {
|
||||
|
||||
let addrs = input.observedAddr
|
||||
|
||||
if (!Array.isArray(input.observedAddr)) {
|
||||
if (!Array.isArray(addrs)) {
|
||||
addrs = [addrs]
|
||||
}
|
||||
|
||||
|
@ -4,3 +4,4 @@ exports = module.exports
|
||||
exports.multicodec = '/ipfs/id/1.0.0'
|
||||
exports.listener = require('./listener')
|
||||
exports.dialer = require('./dialer')
|
||||
exports.message = require('./message')
|
||||
|
@ -11,7 +11,7 @@ module.exports = (conn, pInfoSelf) => {
|
||||
if (err) { return }
|
||||
observedAddrs = observedAddrs[0]
|
||||
|
||||
let publicKey = new Buffer(0)
|
||||
let publicKey = Buffer.alloc(0)
|
||||
if (pInfoSelf.id.pubKey) {
|
||||
publicKey = pInfoSelf.id.pubKey.bytes
|
||||
}
|
||||
@ -21,7 +21,7 @@ module.exports = (conn, pInfoSelf) => {
|
||||
agentVersion: 'na',
|
||||
publicKey: publicKey,
|
||||
listenAddrs: pInfoSelf.multiaddrs.toArray().map((ma) => ma.buffer),
|
||||
observedAddr: observedAddrs ? observedAddrs.buffer : new Buffer('')
|
||||
observedAddr: observedAddrs ? observedAddrs.buffer : Buffer.from('')
|
||||
})
|
||||
|
||||
pull(
|
||||
|
@ -1,7 +1,7 @@
|
||||
'use strict'
|
||||
|
||||
const protobuf = require('protocol-buffers')
|
||||
const schema = new Buffer(`
|
||||
const protons = require('protons')
|
||||
const schema = `
|
||||
message Identify {
|
||||
// protocolVersion determines compatibility between peers
|
||||
optional string protocolVersion = 5; // e.g. ipfs/1.0.0
|
||||
@ -25,6 +25,6 @@ message Identify {
|
||||
|
||||
repeated string protocols = 3;
|
||||
}
|
||||
`)
|
||||
`
|
||||
|
||||
module.exports = protobuf(schema).Identify
|
||||
module.exports = protons(schema).Identify
|
||||
|
@ -8,7 +8,7 @@ chai.use(dirtyChai)
|
||||
|
||||
const identify = require('../src')
|
||||
|
||||
describe('identify', () => {
|
||||
describe('basic', () => {
|
||||
it('multicodec', () => {
|
||||
expect(identify.multicodec).to.eql('/ipfs/id/1.0.0')
|
||||
})
|
@ -16,7 +16,9 @@ const identify = require('../src')
|
||||
|
||||
describe('identify.dialer', () => {
|
||||
let original
|
||||
beforeEach((done) => {
|
||||
beforeEach(function (done) {
|
||||
this.timeout(20 * 1000)
|
||||
|
||||
PeerInfo.create((err, info) => {
|
||||
if (err) {
|
||||
return done(err)
|
||||
@ -58,4 +60,82 @@ describe('identify.dialer', () => {
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
it('does not crash with invalid listen addresses', (done) => {
|
||||
const p = pair()
|
||||
original.multiaddrs.add(multiaddr('/ip4/127.0.0.1/tcp/5002'))
|
||||
const input = msg.encode({
|
||||
protocolVersion: 'ipfs/0.1.0',
|
||||
agentVersion: 'na',
|
||||
publicKey: original.id.pubKey.bytes,
|
||||
listenAddrs: [Buffer.from('ffac010203')],
|
||||
observedAddr: Buffer.from('ffac010203')
|
||||
})
|
||||
|
||||
pull(
|
||||
pull.values([input]),
|
||||
lp.encode(),
|
||||
p[0]
|
||||
)
|
||||
|
||||
identify.dialer(p[1], (err, info, observedAddrs) => {
|
||||
expect(err).to.exist()
|
||||
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
it('does not crash with invalid observed address', (done) => {
|
||||
const p = pair()
|
||||
original.multiaddrs.add(multiaddr('/ip4/127.0.0.1/tcp/5002'))
|
||||
const input = msg.encode({
|
||||
protocolVersion: 'ipfs/0.1.0',
|
||||
agentVersion: 'na',
|
||||
publicKey: original.id.pubKey.bytes,
|
||||
listenAddrs: [multiaddr('/ip4/127.0.0.1/tcp/5002').buffer],
|
||||
observedAddr: Buffer.from('ffac010203')
|
||||
})
|
||||
|
||||
pull(
|
||||
pull.values([input]),
|
||||
lp.encode(),
|
||||
p[0]
|
||||
)
|
||||
|
||||
identify.dialer(p[1], (err, info, observedAddrs) => {
|
||||
expect(err).to.exist()
|
||||
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
it('should return an error with mismatched peerInfo data', (done) => {
|
||||
const p = pair()
|
||||
original.multiaddrs.add(multiaddr('/ip4/127.0.0.1/tcp/5002'))
|
||||
const input = msg.encode({
|
||||
protocolVersion: 'ipfs/0.1.0',
|
||||
agentVersion: 'na',
|
||||
publicKey: original.id.pubKey.bytes,
|
||||
listenAddrs: [multiaddr('/ip4/127.0.0.1/tcp/5002').buffer],
|
||||
observedAddr: multiaddr('/ip4/127.0.0.1/tcp/5001').buffer
|
||||
})
|
||||
|
||||
PeerInfo.create((err, info) => {
|
||||
if (err) {
|
||||
return done(err)
|
||||
}
|
||||
|
||||
pull(
|
||||
pull.values([input]),
|
||||
lp.encode(),
|
||||
p[0]
|
||||
)
|
||||
|
||||
identify.dialer(p[1], info, (err, peerInfo) => {
|
||||
expect(err).to.exist()
|
||||
expect(peerInfo).to.not.exist()
|
||||
done()
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
@ -17,7 +17,9 @@ const identify = require('../src')
|
||||
describe('identify.listener', () => {
|
||||
let info
|
||||
|
||||
beforeEach((done) => {
|
||||
beforeEach(function (done) {
|
||||
this.timeout(20 * 1000)
|
||||
|
||||
PeerInfo.create((err, _info) => {
|
||||
if (err) {
|
||||
return done(err)
|
||||
@ -30,7 +32,9 @@ describe('identify.listener', () => {
|
||||
|
||||
it('works', (done) => {
|
||||
const p = pair()
|
||||
|
||||
info.multiaddrs.add(multiaddr('/ip4/127.0.0.1/tcp/5002'))
|
||||
|
||||
pull(
|
||||
p[1],
|
||||
lp.decode(),
|
||||
|
Reference in New Issue
Block a user