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

Commit

Permalink
fix: multiaddr validation to add peer id for listening
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Mar 6, 2020
1 parent 763d2a0 commit cccb0b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/ipfs/src/core/components/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ module.exports = ({
config.Addresses.Swarm.forEach(addr => {
let ma = multiaddr(addr)

if (ma.getPeerId()) {
const maId = ma.getPeerId()
if (maId && maId !== peerInfo.id.toB58String()) {
ma = ma.encapsulate(`/p2p/${peerInfo.id.toB58String()}`)
}

Expand Down

0 comments on commit cccb0b2

Please sign in to comment.