Skip to content

Commit

Permalink
Replace all \d/quic with \d/quic-v1
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoPolo committed Aug 11, 2023
1 parent 6239983 commit e25fbc1
Show file tree
Hide file tree
Showing 22 changed files with 62 additions and 64 deletions.
2 changes: 0 additions & 2 deletions defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,9 @@ var RandomIdentity = func(cfg *Config) error {
var DefaultListenAddrs = func(cfg *Config) error {
addrs := []string{
"/ip4/0.0.0.0/tcp/0",
"/ip4/0.0.0.0/udp/0/quic",
"/ip4/0.0.0.0/udp/0/quic-v1",
"/ip4/0.0.0.0/udp/0/quic-v1/webtransport",
"/ip6/::/tcp/0",
"/ip6/::/udp/0/quic",
"/ip6/::/udp/0/quic-v1",
"/ip6/::/udp/0/quic-v1/webtransport",
}
Expand Down
2 changes: 1 addition & 1 deletion examples/libp2p-host/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ h2, err := libp2p.New(
// Multiple listen addresses
libp2p.ListenAddrStrings(
"/ip4/0.0.0.0/tcp/9000", // regular tcp connections
"/ip4/0.0.0.0/udp/9000/quic", // a UDP endpoint for the QUIC transport
"/ip4/0.0.0.0/udp/9000/quic-v1", // a UDP endpoint for the QUIC transport
),
// support TLS connections
libp2p.Security(libp2ptls.ID, libp2ptls.New),
Expand Down
6 changes: 3 additions & 3 deletions libp2p_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func TestAutoNATService(t *testing.T) {

func TestDefaultListenAddrs(t *testing.T) {
reTCP := regexp.MustCompile("/(ip)[4|6]/((0.0.0.0)|(::))/tcp/")
reQUIC := regexp.MustCompile("/(ip)[4|6]/((0.0.0.0)|(::))/udp/([0-9]*)/quic")
reQUIC := regexp.MustCompile("/(ip)[4|6]/((0.0.0.0)|(::))/udp/([0-9]*)/quic-v1")
reCircuit := regexp.MustCompile("/p2p-circuit")

// Test 1: Setting the correct listen addresses if userDefined.Transport == nil && userDefined.ListenAddrs == nil
Expand Down Expand Up @@ -180,7 +180,7 @@ func TestTransportConstructorTCP(t *testing.T) {
require.NoError(t, err)
defer h.Close()
require.NoError(t, h.Network().Listen(ma.StringCast("/ip4/127.0.0.1/tcp/0")))
err = h.Network().Listen(ma.StringCast("/ip4/127.0.0.1/udp/0/quic"))
err = h.Network().Listen(ma.StringCast("/ip4/127.0.0.1/udp/0/quic-v1"))
require.Error(t, err)
require.Contains(t, err.Error(), swarm.ErrNoTransport.Error())
}
Expand All @@ -192,7 +192,7 @@ func TestTransportConstructorQUIC(t *testing.T) {
)
require.NoError(t, err)
defer h.Close()
require.NoError(t, h.Network().Listen(ma.StringCast("/ip4/127.0.0.1/udp/0/quic")))
require.NoError(t, h.Network().Listen(ma.StringCast("/ip4/127.0.0.1/udp/0/quic-1")))
err = h.Network().Listen(ma.StringCast("/ip4/127.0.0.1/tcp/0"))
require.Error(t, err)
require.Contains(t, err.Error(), swarm.ErrNoTransport.Error())
Expand Down
16 changes: 8 additions & 8 deletions p2p/host/autorelay/addrsplosion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ func TestCleanupAddrs(t *testing.T) {
t.Run("with no addrplosion", func(t *testing.T) {
addrs := makeAddrList(
"/ip4/127.0.0.1/tcp/4001",
"/ip4/127.0.0.1/udp/4002/quic",
"/ip4/127.0.0.1/udp/4002/quic-v1",
"/ip4/1.2.3.4/tcp/4001",
"/ip4/1.2.3.4/udp/4002/quic",
"/ip4/1.2.3.4/udp/4002/quic-v1",
"/dnsaddr/somedomain.com/tcp/4002/ws",
)
clean := makeAddrList(
"/ip4/1.2.3.4/tcp/4001",
"/ip4/1.2.3.4/udp/4002/quic",
"/ip4/1.2.3.4/udp/4002/quic-v1",
"/dnsaddr/somedomain.com/tcp/4002/ws",
)
require.ElementsMatch(t, clean, cleanupAddressSet(addrs), "cleaned up set doesn't match expected")
Expand All @@ -32,11 +32,11 @@ func TestCleanupAddrs(t *testing.T) {
"/ip4/1.2.3.4/tcp/33333",
"/ip4/1.2.3.4/tcp/33334",
"/ip4/1.2.3.4/tcp/33335",
"/ip4/1.2.3.4/udp/4002/quic",
"/ip4/1.2.3.4/udp/4002/quic-v1",
)
clean := makeAddrList(
"/ip4/1.2.3.4/tcp/4001",
"/ip4/1.2.3.4/udp/4002/quic",
"/ip4/1.2.3.4/udp/4002/quic-v1",
)
require.ElementsMatch(t, clean, cleanupAddressSet(addrs), "cleaned up set doesn't match expected")
})
Expand All @@ -48,11 +48,11 @@ func TestCleanupAddrs(t *testing.T) {
"/ip4/1.2.3.4/tcp/33333",
"/ip4/1.2.3.4/tcp/33334",
"/ip4/1.2.3.4/tcp/33335",
"/ip4/1.2.3.4/udp/4002/quic",
"/ip4/1.2.3.4/udp/4002/quic-v1",
)
clean := makeAddrList(
"/ip4/1.2.3.4/tcp/4001",
"/ip4/1.2.3.4/udp/4002/quic",
"/ip4/1.2.3.4/udp/4002/quic-v1",
)
require.ElementsMatch(t, clean, cleanupAddressSet(addrs), "cleaned up set doesn't match expected")
})
Expand All @@ -75,7 +75,7 @@ func TestCleanupAddrs(t *testing.T) {
// test with a squeaky clean address set
addrs := makeAddrList(
"/ip4/1.2.3.4/tcp/4001",
"/ip4/1.2.3.4/udp/4001/quic",
"/ip4/1.2.3.4/udp/4001/quic-v1",
)
require.ElementsMatch(t, addrs, cleanupAddressSet(addrs), "cleaned up set doesn't match expected")
})
Expand Down
26 changes: 13 additions & 13 deletions p2p/net/swarm/dial_ranker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ func sortAddrDelays(addrDelays []network.AddrDelay) {
}

func TestNoDelayDialRanker(t *testing.T) {
q1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic")
q1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic-v1")
q1v1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic-v1")
wt1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic-v1/webtransport/")
q2 := ma.StringCast("/ip4/1.2.3.4/udp/2/quic")
q2 := ma.StringCast("/ip4/1.2.3.4/udp/2/quic-v1")
q2v1 := ma.StringCast("/ip4/1.2.3.4/udp/2/quic-v1")
q3 := ma.StringCast("/ip4/1.2.3.4/udp/3/quic")
q3 := ma.StringCast("/ip4/1.2.3.4/udp/3/quic-v1")
q3v1 := ma.StringCast("/ip4/1.2.3.4/udp/3/quic-v1")
q4 := ma.StringCast("/ip4/1.2.3.4/udp/4/quic")
q4 := ma.StringCast("/ip4/1.2.3.4/udp/4/quic-v1")
t1 := ma.StringCast("/ip4/1.2.3.5/tcp/1/")

testCase := []struct {
Expand Down Expand Up @@ -70,14 +70,14 @@ func TestNoDelayDialRanker(t *testing.T) {
}

func TestDelayRankerQUICDelay(t *testing.T) {
q1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic")
q1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic-v1")
q1v1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic-v1")
wt1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic-v1/webtransport/")
q2 := ma.StringCast("/ip4/1.2.3.4/udp/2/quic")
q2 := ma.StringCast("/ip4/1.2.3.4/udp/2/quic-v1")
q2v1 := ma.StringCast("/ip4/1.2.3.4/udp/2/quic-v1")
q3 := ma.StringCast("/ip4/1.2.3.4/udp/3/quic")
q3 := ma.StringCast("/ip4/1.2.3.4/udp/3/quic-v1")
q3v1 := ma.StringCast("/ip4/1.2.3.4/udp/3/quic-v1")
q4 := ma.StringCast("/ip4/1.2.3.4/udp/4/quic")
q4 := ma.StringCast("/ip4/1.2.3.4/udp/4/quic-v1")

q1v16 := ma.StringCast("/ip6/1::2/udp/1/quic-v1")
q2v16 := ma.StringCast("/ip6/1::2/udp/2/quic-v1")
Expand Down Expand Up @@ -164,11 +164,11 @@ func TestDelayRankerQUICDelay(t *testing.T) {
}

func TestDelayRankerTCPDelay(t *testing.T) {
q1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic")
q1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic-v1")
q1v1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic-v1")
q2 := ma.StringCast("/ip4/1.2.3.4/udp/2/quic")
q2 := ma.StringCast("/ip4/1.2.3.4/udp/2/quic-v1")
q2v1 := ma.StringCast("/ip4/1.2.3.4/udp/2/quic-v1")
q3 := ma.StringCast("/ip4/1.2.3.4/udp/3/quic")
q3 := ma.StringCast("/ip4/1.2.3.4/udp/3/quic-v1")

q1v16 := ma.StringCast("/ip6/1::2/udp/1/quic-v1")
q2v16 := ma.StringCast("/ip6/1::2/udp/2/quic-v1")
Expand Down Expand Up @@ -238,8 +238,8 @@ func TestDelayRankerTCPDelay(t *testing.T) {
}

func TestDelayRankerRelay(t *testing.T) {
q1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic")
q2 := ma.StringCast("/ip4/1.2.3.4/udp/2/quic")
q1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic-v1")
q2 := ma.StringCast("/ip4/1.2.3.4/udp/2/quic-v1")

pid := test.RandPeerIDFatal(t)
r1 := ma.StringCast(fmt.Sprintf("/ip4/1.2.3.4/tcp/1/p2p-circuit/p2p/%s", pid))
Expand Down
10 changes: 5 additions & 5 deletions p2p/net/swarm/dial_worker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func makeSwarm(t *testing.T) *Swarm {
t.Fatal(err)
}

if err := s.Listen(ma.StringCast("/ip4/127.0.0.1/udp/0/quic")); err != nil {
if err := s.Listen(ma.StringCast("/ip4/127.0.0.1/udp/0/quic-v1")); err != nil {
t.Fatal(err)
}

Expand Down Expand Up @@ -234,7 +234,7 @@ func TestDialWorkerLoopFailure(t *testing.T) {

_, p2 := newPeer(t)

s1.Peerstore().AddAddrs(p2, []ma.Multiaddr{ma.StringCast("/ip4/11.0.0.1/tcp/1234"), ma.StringCast("/ip4/11.0.0.1/udp/1234/quic")}, peerstore.PermanentAddrTTL)
s1.Peerstore().AddAddrs(p2, []ma.Multiaddr{ma.StringCast("/ip4/11.0.0.1/tcp/1234"), ma.StringCast("/ip4/11.0.0.1/udp/1234/quic-v1")}, peerstore.PermanentAddrTTL)

reqch := make(chan dialRequest)
resch := make(chan dialResponse)
Expand All @@ -259,7 +259,7 @@ func TestDialWorkerLoopConcurrentFailure(t *testing.T) {

_, p2 := newPeer(t)

s1.Peerstore().AddAddrs(p2, []ma.Multiaddr{ma.StringCast("/ip4/11.0.0.1/tcp/1234"), ma.StringCast("/ip4/11.0.0.1/udp/1234/quic")}, peerstore.PermanentAddrTTL)
s1.Peerstore().AddAddrs(p2, []ma.Multiaddr{ma.StringCast("/ip4/11.0.0.1/tcp/1234"), ma.StringCast("/ip4/11.0.0.1/udp/1234/quic-v1")}, peerstore.PermanentAddrTTL)

reqch := make(chan dialRequest)
worker := newDialWorker(s1, p2, reqch, nil)
Expand Down Expand Up @@ -307,7 +307,7 @@ func TestDialWorkerLoopConcurrentMix(t *testing.T) {
defer s2.Close()

s1.Peerstore().AddAddrs(s2.LocalPeer(), s2.ListenAddresses(), peerstore.PermanentAddrTTL)
s1.Peerstore().AddAddrs(s2.LocalPeer(), []ma.Multiaddr{ma.StringCast("/ip4/11.0.0.1/tcp/1234"), ma.StringCast("/ip4/11.0.0.1/udp/1234/quic")}, peerstore.PermanentAddrTTL)
s1.Peerstore().AddAddrs(s2.LocalPeer(), []ma.Multiaddr{ma.StringCast("/ip4/11.0.0.1/tcp/1234"), ma.StringCast("/ip4/11.0.0.1/udp/1234/quic-v1")}, peerstore.PermanentAddrTTL)

reqch := make(chan dialRequest)
worker := newDialWorker(s1, s2.LocalPeer(), reqch, nil)
Expand Down Expand Up @@ -917,7 +917,7 @@ func TestDialWorkerLoopQuicOverTCP(t *testing.T) {
tc := schedulingTestCase{
input: []timedDial{
{
addr: ma.StringCast("/ip4/127.0.0.1/udp/20000/quic"),
addr: ma.StringCast("/ip4/127.0.0.1/udp/20000/quic-v1"),
delay: 0,
success: true,
},
Expand Down
2 changes: 1 addition & 1 deletion p2p/net/swarm/swarm_addr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestDialAddressSelection(t *testing.T) {
require.NoError(t, s.AddTransport(circuitTr))

require.Equal(t, tcpTr, s.TransportForDialing(ma.StringCast("/ip4/127.0.0.1/tcp/1234")))
require.Equal(t, quicTr, s.TransportForDialing(ma.StringCast("/ip4/127.0.0.1/udp/1234/quic")))
require.Equal(t, quicTr, s.TransportForDialing(ma.StringCast("/ip4/127.0.0.1/udp/1234/quic-v1")))
require.Equal(t, circuitTr, s.TransportForDialing(ma.StringCast(fmt.Sprintf("/ip4/127.0.0.1/udp/1234/quic/p2p-circuit/p2p/%s", id))))
require.Equal(t, webtransportTr, s.TransportForDialing(ma.StringCast(fmt.Sprintf("/ip4/127.0.0.1/udp/1234/quic-v1/webtransport/certhash/%s", certHash))))
require.Nil(t, s.TransportForDialing(ma.StringCast("/ip4/1.2.3.4")))
Expand Down
6 changes: 3 additions & 3 deletions p2p/net/swarm/swarm_dial_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,15 +263,15 @@ func TestAddrResolutionRecursive(t *testing.T) {
}

func TestAddrsForDialFiltering(t *testing.T) {
q1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic")
q1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic-v1")
q1v1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic-v1")
wt1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic-v1/webtransport/")

q2 := ma.StringCast("/ip4/1.2.3.4/udp/2/quic")
q2 := ma.StringCast("/ip4/1.2.3.4/udp/2/quic-v1")
q2v1 := ma.StringCast("/ip4/1.2.3.4/udp/2/quic-v1")
wt2 := ma.StringCast("/ip4/1.2.3.4/udp/2/quic-v1/webtransport/")

q3 := ma.StringCast("/ip4/1.2.3.4/udp/3/quic")
q3 := ma.StringCast("/ip4/1.2.3.4/udp/3/quic-v1")

t1 := ma.StringCast("/ip4/1.2.3.4/tcp/1")
ws1 := ma.StringCast("/ip4/1.2.3.4/tcp/1/ws")
Expand Down
2 changes: 1 addition & 1 deletion p2p/net/swarm/swarm_metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func BenchmarkMetricsConnOpen(b *testing.B) {
}
_, pub, err := crypto.GenerateEd25519Key(rand.Reader)
require.NoError(b, err)
quicAddr := ma.StringCast("/ip4/1.2.3.4/udp/1/quic")
quicAddr := ma.StringCast("/ip4/1.2.3.4/udp/1/quic-v1")
tcpAddr := ma.StringCast("/ip4/1.2.3.4/tcp/1/")
tr := NewMetricsTracer()
for i := 0; i < b.N; i++ {
Expand Down
2 changes: 1 addition & 1 deletion p2p/net/swarm/swarm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ func TestTypedNilConn(t *testing.T) {

func TestPreventDialListenAddr(t *testing.T) {
s := GenSwarm(t, OptDialOnly)
if err := s.Listen(ma.StringCast("/ip4/0.0.0.0/udp/0/quic")); err != nil {
if err := s.Listen(ma.StringCast("/ip4/0.0.0.0/udp/0/quic-v1")); err != nil {
t.Fatal(err)
}
addrs, err := s.InterfaceListenAddresses()
Expand Down
2 changes: 1 addition & 1 deletion p2p/net/swarm/testing/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func GenSwarm(t *testing.T, opts ...Option) *swarm.Swarm {
t.Fatal(err)
}
if !cfg.dialOnly {
if err := s.Listen(ma.StringCast("/ip4/127.0.0.1/udp/0/quic")); err != nil {
if err := s.Listen(ma.StringCast("/ip4/127.0.0.1/udp/0/quic-v1")); err != nil {
t.Fatal(err)
}
}
Expand Down
2 changes: 1 addition & 1 deletion p2p/net/swarm/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestIsFdConsuming(t *testing.T) {
isFdConsuming: true,
},
"quic": {
addr: "/ip4/127.0.0.1/udp/0/quic",
addr: "/ip4/127.0.0.1/udp/0/quic-v1",
isFdConsuming: false,
},
"addr-without-registered-transport": {
Expand Down
4 changes: 2 additions & 2 deletions p2p/protocol/holepunch/metrics_noalloc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ func TestNoCoverNoAllocMetrics(t *testing.T) {
addrs1 := [][]ma.Multiaddr{
{
ma.StringCast("/ip4/0.0.0.0/tcp/1"),
ma.StringCast("/ip4/1.2.3.4/udp/2/quic"),
ma.StringCast("/ip4/1.2.3.4/udp/2/quic-v1"),
},
nil,
}
addrs2 := [][]ma.Multiaddr{
{
ma.StringCast("/ip4/1.2.3.4/tcp/3"),
ma.StringCast("/ip4/1.2.3.4/udp/4/quic"),
ma.StringCast("/ip4/1.2.3.4/udp/4/quic-v1"),
},
nil,
}
Expand Down
4 changes: 2 additions & 2 deletions p2p/protocol/holepunch/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ func TestHolePunchOutcomeCounter(t *testing.T) {
t1 := ma.StringCast("/ip4/1.2.3.4/tcp/1")
t2 := ma.StringCast("/ip4/1.2.3.4/tcp/2")

q1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic")
q2 := ma.StringCast("/ip4/1.2.3.4/udp/2/quic")
q1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic-v1")
q2 := ma.StringCast("/ip4/1.2.3.4/udp/2/quic-v1")

q1v1 := ma.StringCast("/ip4/1.2.3.4/udp/1/quic-v1")

Expand Down
6 changes: 3 additions & 3 deletions p2p/protocol/identify/obsaddr_glass_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ func TestObservedAddrGroupKey(t *testing.T) {
oa3 := &observedAddr{addr: ma.StringCast("/ip4/1.2.3.5/tcp/1231")}
oa4 := &observedAddr{addr: ma.StringCast("/ip4/1.2.3.4/udp/1231")}
oa5 := &observedAddr{addr: ma.StringCast("/ip4/1.2.3.4/udp/1531")}
oa6 := &observedAddr{addr: ma.StringCast("/ip4/1.2.3.4/udp/1531/quic")}
oa7 := &observedAddr{addr: ma.StringCast("/ip4/1.2.3.4/udp/1111/quic")}
oa8 := &observedAddr{addr: ma.StringCast("/ip4/1.2.3.5/udp/1111/quic")}
oa6 := &observedAddr{addr: ma.StringCast("/ip4/1.2.3.4/udp/1531/quic-v1")}
oa7 := &observedAddr{addr: ma.StringCast("/ip4/1.2.3.4/udp/1111/quic-v1")}
oa8 := &observedAddr{addr: ma.StringCast("/ip4/1.2.3.5/udp/1111/quic-v1")}

// different ports, same IP => same key
require.Equal(t, oa1.groupKey(), oa2.groupKey())
Expand Down
6 changes: 3 additions & 3 deletions p2p/test/quic/quic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestQUICVersions(t *testing.T) {
libp2p.Transport(libp2pquic.NewTransport),
libp2p.Transport(webtransport.New),
libp2p.ListenAddrStrings(
"/ip4/127.0.0.1/udp/12345/quic", // QUIC draft-29
"/ip4/127.0.0.1/udp/12345/quic-v1", // QUIC draft-29
"/ip4/127.0.0.1/udp/12345/quic-v1", // QUIC v1
),
)
Expand Down Expand Up @@ -85,7 +85,7 @@ func TestDisableQUICDraft29(t *testing.T) {
libp2p.Transport(libp2pquic.NewTransport),
libp2p.Transport(webtransport.New),
libp2p.ListenAddrStrings(
"/ip4/127.0.0.1/udp/12346/quic", // QUIC draft-29
"/ip4/127.0.0.1/udp/12346/quic-v1", // QUIC draft-29
"/ip4/127.0.0.1/udp/12346/quic-v1", // QUIC v1
),
)
Expand All @@ -107,7 +107,7 @@ func TestDisableQUICDraft29(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 300*time.Microsecond)
defer cancel()
require.ErrorIs(t,
h2.Connect(ctx, peer.AddrInfo{ID: h1.ID(), Addrs: []ma.Multiaddr{ma.StringCast("/ip4/127.0.0.1/udp/12346/quic")}}),
h2.Connect(ctx, peer.AddrInfo{ID: h1.ID(), Addrs: []ma.Multiaddr{ma.StringCast("/ip4/127.0.0.1/udp/12346/quic-v1")}}),
context.DeadlineExceeded,
)
// make sure that dialing QUIC v1 works
Expand Down
4 changes: 2 additions & 2 deletions p2p/transport/quic/conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ func TestGetErrorWhenListeningWithDraft29WhenDisabled(t *testing.T) {
t1, err := NewTransport(serverKey, newConnManager(t, quicreuse.DisableDraft29()), nil, nil, nil)
require.NoError(t, err)
defer t1.(io.Closer).Close()
laddr, err := ma.NewMultiaddr("/ip4/127.0.0.1/udp/0/quic")
laddr, err := ma.NewMultiaddr("/ip4/127.0.0.1/udp/0/quic-v1")
require.NoError(t, err)
_, err = t1.Listen(laddr)
require.Error(t, err)
Expand Down Expand Up @@ -725,7 +725,7 @@ func TestClientCanDialDifferentQUICVersions(t *testing.T) {
mas := []ma.Multiaddr{ln1.Multiaddr()}
var ln2 tpt.Listener
if !tc.serverDisablesDraft29 {
laddrDraft29 := ma.StringCast("/ip4/127.0.0.1/udp/0/quic")
laddrDraft29 := ma.StringCast("/ip4/127.0.0.1/udp/0/quic-v1")
ln2, err = t1.Listen(laddrDraft29)
require.NoError(t, err)
t.Cleanup(func() { ln2.Close() })
Expand Down
Loading

0 comments on commit e25fbc1

Please sign in to comment.