[#607] network: Use Equal method in IsLocalAddress function

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-06-16 13:28:20 +03:00 committed by Leonard Lyubich
parent b2b33aeac9
commit 6de0af0650

View file

@ -129,7 +129,7 @@ func multiaddrStringFromHostAddr(host string) (string, error) {
// IsLocalAddress returns true if network endpoint from local address
// source is equal to network endpoint of passed address.
func IsLocalAddress(src LocalAddressSource, addr *Address) bool {
return src.LocalAddress().ma.Equal(addr.ma)
return src.LocalAddress().Equal(addr)
}
// HostAddrFromMultiaddr converts "/dns4/localhost/tcp/8080" to "localhost:8080".