go-libp2p
go-libp2p copied to clipboard
Use either protocol.ID everywhere
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:
- Annoying.
- 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.
cc @raulk?
Duplicate of #1886.