This fixes an issue with .distinct() being called when the addresses do not have ports. It's entirely valid to have an address that doesn't have a port, so we should just treat the entirety of those addresses as unique.
Note, as mentioned in comments in distinct this logic doesn't really belong in PeerInfo. When we implement https://github.com/libp2p/interface-transport/issues/41 for transports, it should handle distinct addresses when listening. This is a stop gap until that is complete.
This fixes an issue with
.distinct()
being called when the addresses do not have ports. It's entirely valid to have an address that doesn't have a port, so we should just treat the entirety of those addresses as unique.Note, as mentioned in comments in
distinct
this logic doesn't really belong in PeerInfo. When we implement https://github.com/libp2p/interface-transport/issues/41 for transports, it should handle distinct addresses when listening. This is a stop gap until that is complete.required by https://github.com/ipfs/interop/issues/63