diff --git a/peerstore/peerstore.go b/peerstore/peerstore.go index 3ea50c2dfc9e6358d5094bf1631a86398617a49c..3c621b5c8b1a636871988be33682e6656375695b 100644 --- a/peerstore/peerstore.go +++ b/peerstore/peerstore.go @@ -238,7 +238,8 @@ type ProtoBook interface { // If the returned error is not nil, the result is indeterminate. 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. - SupportsAnyProtocol(peer.ID, ...string) (bool, error) + FirstSupportedProtocol(peer.ID, ...string) (string, error) }