Browse Source

swarm: fix addr for TestBlackHoledAddrBlocked (#2803)

pull/2804/head
sukun 6 months ago
committed by GitHub
parent
commit
3dba03a319
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      p2p/net/swarm/swarm_dial_test.go

5
p2p/net/swarm/swarm_dial_test.go

@ -366,8 +366,9 @@ func TestBlackHoledAddrBlocked(t *testing.T) {
n := 3 n := 3
s.bhd.ipv6 = &blackHoleFilter{n: n, minSuccesses: 1, name: "IPv6"} s.bhd.ipv6 = &blackHoleFilter{n: n, minSuccesses: 1, name: "IPv6"}
// all dials to the address will fail. RFC6666 Discard Prefix // All dials to this addr will fail.
addr := ma.StringCast("/ip6/0100::1/tcp/54321/") // manet.IsPublic is aggressive for IPv6 addresses. Use a NAT64 address.
addr := ma.StringCast("/ip6/64:ff9b::1.2.3.4/tcp/54321/")
p, err := test.RandPeerID() p, err := test.RandPeerID()
if err != nil { if err != nil {

Loading…
Cancel
Save