From 34f061a116a2d8f6c4a0cb7e5bfcb0da64f9336b Mon Sep 17 00:00:00 2001 From: Aarsh Shah Date: Mon, 11 May 2020 13:00:05 +0530 Subject: [PATCH] changes as per review --- core/peerstore/peerstore.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/peerstore/peerstore.go b/core/peerstore/peerstore.go index 3ea50c2dfc..3c621b5c8b 100644 --- a/core/peerstore/peerstore.go +++ b/core/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) }