Skip to content

Commit 21fd9f0

Browse files
committed
p2p/nat: fix a bytes based net.IP comparison
1 parent 2573094 commit 21fd9f0

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎p2p/nat/nat_test.go‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package nat
1818

1919
import (
20-
"bytes"
2120
"net"
2221
"testing"
2322
"time"
@@ -56,7 +55,7 @@ func TestAutoDiscRace(t *testing.T) {
5655
t.Errorf("result %d: unexpected error: %v", i, rval.err)
5756
}
5857
wantIP := net.IP{33, 44, 55, 66}
59-
if !bytes.Equal(rval.ip, wantIP) {
58+
if !rval.ip.Equal(wantIP) {
6059
t.Errorf("result %d: got IP %v, want %v", i, rval.ip, wantIP)
6160
}
6261
}

0 commit comments

Comments
 (0)