Skip to content

Commit 8103832

Browse files
committed
tests: fix TestP2PPrivateAddresses
After multiformats/go-multiaddr#235 the test example became invalid, fixed
1 parent 1375a58 commit 8103832

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

network/p2p/p2p.go

-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,6 @@ func formatPeerTelemetryInfoProtocolName(telemetryID string, telemetryInstance s
349349
var private6 = parseCIDR([]string{
350350
"100::/64",
351351
"2001:2::/48",
352-
"2001:db8::/32", // multiaddr v0.13 has it
353352
})
354353

355354
// parseCIDR converts string CIDRs to net.IPNet.

network/p2p/p2p_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,13 @@ func TestP2PPrivateAddresses(t *testing.T) {
197197
"/ip4/255.255.255.255/ipcidr/32",
198198
"/ip6/fc00::/ipcidr/7",
199199
"/ip6/fe80::/ipcidr/10",
200+
"/ip6/2001:db8::/ipcidr/32",
200201
}
201202

202203
// these are handled by addrFilter explicitly as a custom filter
203204
extra := []string{
204205
"/ip6/100::/ipcidr/64",
205206
"/ip6/2001:2::/ipcidr/48",
206-
"/ip6/2001:db8::/ipcidr/32", // multiaddr v0.13 has it
207207
}
208208

209209
for _, addr := range privAddrList {
@@ -220,7 +220,7 @@ func TestP2PPrivateAddresses(t *testing.T) {
220220
// ensure addrFilter allows normal addresses
221221
valid := []string{
222222
"/ip4/3.4.5.6/tcp/1234",
223-
"/ip6/200:11::/tcp/1234",
223+
"/ip6/2606:4700::/tcp/1234",
224224
}
225225

226226
for _, addr := range valid {

0 commit comments

Comments
 (0)