Commit dabf5bbf authored by Aarsh Shah's avatar Aarsh Shah

changes as per review

parent 98b95a48
...@@ -238,7 +238,8 @@ type ProtoBook interface { ...@@ -238,7 +238,8 @@ type ProtoBook interface {
// If the returned error is not nil, the result is indeterminate. // If the returned error is not nil, the result is indeterminate.
SupportsProtocols(peer.ID, ...string) ([]string, error) SupportsProtocols(peer.ID, ...string) ([]string, error)
// SupportsAnyProtocol returns true if the peer supports ATLEAST ONE of the given protocols and false otherwise. // FirstSupportedProtocol returns the first protocol that the peer supports among the given protocols.
// If the peer does not support any of the given protocols, this function will return an empty string and a nil error.
// If the returned error is not nil, the result is indeterminate. // If the returned error is not nil, the result is indeterminate.
SupportsAnyProtocol(peer.ID, ...string) (bool, error) FirstSupportedProtocol(peer.ID, ...string) (string, error)
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment