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

Conversation

achingbrain
Copy link
Member

When a routing returns a set of multiaddrs, honour them as returned instead of appending the peer id to them.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

When a routing returns a set of multiaddrs, honour them as returned
instead of appending the peer id to them.
@achingbrain achingbrain requested a review from a team as a code owner April 23, 2024 06:30
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.

@achingbrain achingbrain merged commit e4e67d0 into main Apr 24, 2024
18 checks passed
@achingbrain achingbrain deleted the fix/do-not-append-peer-ids branch April 24, 2024 06:21
@achingbrain achingbrain mentioned this pull request Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants