Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not append peer ids to provider multiaddrs #516

Merged
merged 1 commit into from
Apr 24, 2024
Merged
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
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}`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why were we doing this in the first place?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question, I don't think it's necessary since we only care when we try to dial a multiaddr, and libp2p appends it if it's not there at that point.

})

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