From 61cf5439831ac00429cb1600ffcc15cb79a87d0b Mon Sep 17 00:00:00 2001 From: mrekucci Date: Mon, 6 Nov 2023 16:41:18 +0700 Subject: [PATCH] fix: open API spec --- openapi/SwarmCommon.yaml | 4 ++-- pkg/p2p/discover.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openapi/SwarmCommon.yaml b/openapi/SwarmCommon.yaml index 833c8e720bb..c84095bc5a5 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") })