fix inverted address selection logic in test

This commit is contained in:
vyzo 2018-10-20 20:53:56 +03:00
parent ee69383c2c
commit dcb8fd2813
1 changed files with 2 additions and 2 deletions

View File

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