diff --git a/openapi/SwarmCommon.yaml b/openapi/SwarmCommon.yaml index 7c5e7992704..5e7ab092b8f 100644 --- a/openapi/SwarmCommon.yaml +++ b/openapi/SwarmCommon.yaml @@ -326,11 +326,11 @@ components: $ref: "#/components/schemas/Address" fullNode: type: boolean - p2pTransport: + underlay: type: array nullable: true items: - type: string + $ref: "SwarmCommon.yaml#/components/schemas/MultiAddress" BlockListedPeers: diff --git a/pkg/p2p/discover.go b/pkg/p2p/discover.go index 80ac15ae483..bd603b7b7a8 100644 --- a/pkg/p2p/discover.go +++ b/pkg/p2p/discover.go @@ -36,7 +36,7 @@ func Discover(ctx context.Context, addr ma.Multiaddr, f func(ma.Multiaddr) (bool return false, errors.New("non-resolvable API endpoint") } - // sort addrs so that quic is tried first + // Prioritize QUIC transport connections over the others. sort.Slice(addrs, func(i, j int) bool { return strings.Contains(addrs[i].String(), "/quic") })