Browse Source

fix inverted address selection logic in test

pull/454/head
vyzo 6 years ago
parent
commit
dcb8fd2813
  1. 4
      p2p/host/relay/autorelay_test.go

4
p2p/host/relay/autorelay_test.go

@ -160,7 +160,7 @@ func TestAutoRelay(t *testing.T) {
haveRelay := false
for _, addr := range h3.Addrs() {
_, err := addr.ValueForProtocol(circuit.P_CIRCUIT)
if err != nil {
if err == nil {
haveRelay = true
break
}
@ -174,7 +174,7 @@ func TestAutoRelay(t *testing.T) {
var raddrs []ma.Multiaddr
for _, addr := range h3.Addrs() {
_, err := addr.ValueForProtocol(circuit.P_CIRCUIT)
if err != nil {
if err == nil {
raddrs = append(raddrs, addr)
}
}

Loading…
Cancel
Save