chore: use the new multiaddr.Contains function (#1618)

This commit is contained in:
Marten Seemann
2022-06-28 10:35:22 +02:00
committed by GitHub
parent 1fd5029c8b
commit d8c4f163a3
6 changed files with 10 additions and 77 deletions
+1 -6
View File
@@ -240,12 +240,7 @@ func TestAllAddrs(t *testing.T) {
// should contain localhost and private local addr along with previous listen address
require.Len(t, h.AllAddrs(), 3)
// Should still contain the original addr.
for _, a := range h.AllAddrs() {
if a.Equal(firstAddr) {
return
}
}
t.Fatal("expected addrs to contain original addr")
require.True(t, ma.Contains(h.AllAddrs(), firstAddr), "should still contain the original addr")
}
// getHostPair gets a new pair of hosts.