feat(deps): update to go-data-transfer v2, still wip

This commit is contained in:
hannahhoward
2023-03-07 11:44:29 -08:00
parent 64b9b532c0
commit 16dad6342c
25 changed files with 239 additions and 279 deletions
+6 -2
View File
@@ -91,8 +91,12 @@ func (a *NetAPI) NetPeerInfo(_ context.Context, p peer.ID) (*api.ExtendedPeerInf
protocols, err := a.Host.Peerstore().GetProtocols(p)
if err == nil {
sort.Strings(protocols)
info.Protocols = protocols
protocolStrings := make([]string, 0, len(protocols))
for _, protocol := range protocols {
protocolStrings = append(protocolStrings, string(protocol))
}
sort.Strings(protocolStrings)
info.Protocols = protocolStrings
}
if cm := a.Host.ConnManager().GetTagInfo(p); cm != nil {