aboutsummaryrefslogtreecommitdiffstats
path: root/p2p
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-12-15 22:28:31 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-12-15 22:28:31 +0800
commit21fd9f037e38dbfa5e34366f2106e31cede50d4b (patch)
treeab4e2aad8db91774baeb1ed6f98997c756d9f7f1 /p2p
parent2573094df2b3f2fad03ce465694f24e9899a31e4 (diff)
downloaddexon-21fd9f037e38dbfa5e34366f2106e31cede50d4b.tar
dexon-21fd9f037e38dbfa5e34366f2106e31cede50d4b.tar.gz
dexon-21fd9f037e38dbfa5e34366f2106e31cede50d4b.tar.bz2
dexon-21fd9f037e38dbfa5e34366f2106e31cede50d4b.tar.lz
dexon-21fd9f037e38dbfa5e34366f2106e31cede50d4b.tar.xz
dexon-21fd9f037e38dbfa5e34366f2106e31cede50d4b.tar.zst
dexon-21fd9f037e38dbfa5e34366f2106e31cede50d4b.zip
p2p/nat: fix a bytes based net.IP comparison
Diffstat (limited to 'p2p')
-rw-r--r--p2p/nat/nat_test.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/p2p/nat/nat_test.go b/p2p/nat/nat_test.go
index a079e7a22..469101e99 100644
--- a/p2p/nat/nat_test.go
+++ b/p2p/nat/nat_test.go
@@ -17,7 +17,6 @@
package nat
import (
- "bytes"
"net"
"testing"
"time"
@@ -56,7 +55,7 @@ func TestAutoDiscRace(t *testing.T) {
t.Errorf("result %d: unexpected error: %v", i, rval.err)
}
wantIP := net.IP{33, 44, 55, 66}
- if !bytes.Equal(rval.ip, wantIP) {
+ if !rval.ip.Equal(wantIP) {
t.Errorf("result %d: got IP %v, want %v", i, rval.ip, wantIP)
}
}