Selaa lähdekoodia

p2p/nat: fix a bytes based net.IP comparison

Péter Szilágyi 9 vuotta sitten
vanhempi
commit
21fd9f037e
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  1. 1 2
      p2p/nat/nat_test.go

+ 1 - 2
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)
 			}
 		}