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

Commit

Permalink
fix: incoming message should not connect to peers (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Shaw authored and vasco-santos committed Mar 13, 2019
1 parent 0ff83dd commit 8c16b81
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
5 changes: 0 additions & 5 deletions src/message/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,6 @@ function fromPbPeer (peer) {
const info = new PeerInfo(new PeerId(peer.id))
peer.addrs.forEach((a) => info.multiaddrs.add(a))

// TODO: upgrade protobuf to send the address connected on
if (peer.connection === CONNECTION_TYPE.CONNECTED) {
info.connect(peer.addrs[0])
}

return info
}

Expand Down
2 changes: 0 additions & 2 deletions test/message.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ describe('Message', () => {
expect(peer.id.isEqual(msg.closerPeers[i].id)).to.eql(true)
expect(peer.multiaddrs.toArray())
.to.eql(msg.closerPeers[i].multiaddrs.toArray())

expect(peer.isConnected()).to.eql(peer.multiaddrs.toArray()[0])
})

expect(dec.providerPeers).to.have.length(5)
Expand Down

0 comments on commit 8c16b81

Please sign in to comment.