mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-03 23:02:55 +00:00
p2p/nat: fix a bytes based net.IP comparison
This commit is contained in:
parent
2573094df2
commit
21fd9f037e
1 changed files with 1 additions and 2 deletions
|
|
@ -17,7 +17,6 @@
|
||||||
package nat
|
package nat
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
|
||||||
"net"
|
"net"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
@ -56,7 +55,7 @@ func TestAutoDiscRace(t *testing.T) {
|
||||||
t.Errorf("result %d: unexpected error: %v", i, rval.err)
|
t.Errorf("result %d: unexpected error: %v", i, rval.err)
|
||||||
}
|
}
|
||||||
wantIP := net.IP{33, 44, 55, 66}
|
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)
|
t.Errorf("result %d: got IP %v, want %v", i, rval.ip, wantIP)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue