p2p/netutil: fix comments

This commit is contained in:
Hteev Oli 2024-06-06 11:11:45 +08:00 committed by GitHub
parent bc6569462d
commit f5e38247a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -288,12 +288,12 @@ func (s *DistinctNetSet) RemoveAddr(ip netip.Addr) {
}
}
// Contains whether the given IP is contained in the set.
// Contains reports whether the given IP is contained in the set.
func (s DistinctNetSet) Contains(ip net.IP) bool {
return s.ContainsAddr(IPToAddr(ip))
}
// ContainsAddr whether the given IP is contained in the set.
// ContainsAddr reports whether the given IP is contained in the set.
func (s DistinctNetSet) ContainsAddr(ip netip.Addr) bool {
key := s.key(ip)
_, ok := s.members[key]