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

fix: incoming message should not connect to peers #88

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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