p2p/discover, p2p/discv5: use flexible comparison for IPs

This commit is contained in:
Péter Szilágyi
2016-12-14 18:40:49 +02:00
parent 745026b7b4
commit 2573094df2
4 changed files with 4 additions and 5 deletions

View File

@ -196,7 +196,7 @@ func makeEndpoint(addr *net.UDPAddr, tcpPort uint16) rpcEndpoint {
}
func (e1 rpcEndpoint) equal(e2 rpcEndpoint) bool {
return e1.UDP == e2.UDP && e1.TCP == e2.TCP && bytes.Equal(e1.IP, e2.IP)
return e1.UDP == e2.UDP && e1.TCP == e2.TCP && e1.IP.Equal(e2.IP)
}
func nodeFromRPC(sender *net.UDPAddr, rn rpcNode) (*Node, error) {