Skip to content

Commit

Permalink
Merge pull request #2062 from CortexFoundation/dev
Browse files Browse the repository at this point in the history
p2p/netutil: fix comments
  • Loading branch information
ucwong authored Jun 17, 2024
2 parents 2058221 + 2d810d9 commit ae06432
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions p2p/netutil/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit ae06432

Please sign in to comment.