Conversation
test/peer-info.spec.js
Outdated
|
|
||
| it('add multiaddr', () => { | ||
| const pi = new PeerInfo() | ||
| expect(pi).to.exist |
There was a problem hiding this comment.
checking something to exist every time doesn't seem useful
test/peer-info.spec.js
Outdated
|
|
||
| it('add multiaddr that are buffers', () => { | ||
| const pi = new PeerInfo() | ||
| expect(pi).to.exist |
test/peer-info.spec.js
Outdated
|
|
||
| it('add repeated multiaddr', () => { | ||
| const pi = new PeerInfo() | ||
| expect(pi).to.exist |
|
How did you solve the PCKS#1 vs PKCS#6. Can we confirm that we are manipulating and storing the keys in the same way as in go? This will be crucial for config file share, identify and secio crypto handshake. |
We already had tests for this (the go interop part) here and in libp2p-crypto. You can see the details of the conversion here: libp2p/js-libp2p-crypto@eb5de10 |
src/index.js
Outdated
| // look at https://github.com/whyrusleeping/js-mafmt/blob/master/src/index.js | ||
| } | ||
|
|
||
| Peer.create = (cb) => { |
There was a problem hiding this comment.
Ok, to simplify, let's default to use PeerInfo.create
- s/Peer/PeerInfo
- signature becomes
(peerId, callback) => - Use always PeerInfo.create everywhere
There was a problem hiding this comment.
You mean with peerId being optional?
src/index.js
Outdated
| return cb(err) | ||
| } | ||
|
|
||
| cb(null, new Peer(key)) |
|
BREAKING CHANGE New method PeerInfo.create(cb) replaces the previous new PeerInfo() to create a fresh id
d4589d4 to
365b130
Compare
.travis.yml
Outdated
| env: CXX=g++-4.8 | ||
| - node_js: stable | ||
| env: | ||
| - SAUCE=true |
|
@diasdavid should be ready now |
Ref libp2p/js-libp2p-crypto#10
BREAKING CHANGE
New method PeerInfo.create(cb) replaces the previous new PeerInfo() to create a fresh id