Skip to content

Commit

Permalink
fix: do not append peer ids to provider multiaddrs (#516)
Browse files Browse the repository at this point in the history
When a routing returns a set of multiaddrs, honour them as returned
instead of appending the peer id to them.
  • Loading branch information
achingbrain authored Apr 24, 2024
1 parent 0a528bb commit e4e67d0
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/utils/src/routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ export class Routing implements RoutingInterface, Startable {
continue
}

peer.multiaddrs = peer.multiaddrs.map(ma => {
if (ma.getPeerId() != null) {
return ma
}

return ma.encapsulate(`/p2p/${peer.id}`)
})

// have to refresh peer info for this peer to get updated multiaddrs
if (peer.multiaddrs.length === 0) {
// already looking this peer up
Expand Down

0 comments on commit e4e67d0

Please sign in to comment.