p2p/netutil: fix comments (#29942)

pull/29944/head
Hteev Oli 4 months ago committed by GitHub
parent cbbfa3eac0
commit 0750cb0c8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      p2p/netutil/net.go

@ -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]

Loading…
Cancel
Save