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

Use either protocol.ID everywhere #1693

Closed
Stebalien opened this issue Apr 27, 2020 · 2 comments
Closed

Use either protocol.ID everywhere #1693

Stebalien opened this issue Apr 27, 2020 · 2 comments
Labels
kind/enhancement A net-new feature or improvement to an existing feature

Comments

@Stebalien
Copy link
Member

Currently, we use protocol.ID in some places, and string in others. We should just use protocol.ID.

  • Peerstore - string
  • NewStream - protocol.ID
  • Multistream - string
  • Stream.(Set)Protocol() - protocol.ID

This is:

  1. Annoying.
  2. Expensive. We end up allocating to convert between these.

Unfortunately, the simple way of fixing this is breaking the peerstore interfaces. I'd like to just rip off the band-aid and do that.

@Stebalien Stebalien added the kind/enhancement A net-new feature or improvement to an existing feature label Apr 27, 2020
@Stebalien
Copy link
Member Author

cc @raulk?

@marten-seemann marten-seemann transferred this issue from libp2p/go-libp2p-core Aug 19, 2022
@marten-seemann
Copy link
Contributor

Duplicate of #1886.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants