-
Notifications
You must be signed in to change notification settings - Fork 28
Understanding the types of variables in js-peer-info constructor #72
Comments
This is not documented and is not covered by the tests. |
@pgte I've never seen |
Even though it's not being done currently, wouldn't be a good idea to keep it so that it is interoperable with the Go implementation and for potential users that do want to specify the protocols that a peer accepts? |
Apparently PeerBook is actually copying protocols https://github.com/libp2p/js-peer-book/blob/v0.9.1/src/index.js#L63 on puts (there are no tests), but I don't know of anything that is setting it. Switch would be the thing to set that, but it's not. Interop with go wouldn't really be affected by this, as that info isn't passed across nodes. Performing an We can leave it, but it should get documented (as a set of strings) and we should add some basic tests for it. Ideally to PeerBook too. |
I am in the process of attempting a gossipsub implementation in JS.
As I was going through the code for js-peer-info, I noticed that there is a variable
this.protocols
that is of typeSet
(see here). However, it is not at all clear what this contains. Is it analogous to the Go protocol string type? If so, would simply using aString
suffice for the elements ofthis.protocols
?The text was updated successfully, but these errors were encountered: