mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
p2p/netutil: fix
This commit is contained in:
parent
276253326d
commit
b038ec08d9
1 changed files with 1 additions and 5 deletions
|
|
@ -290,11 +290,7 @@ func (s *DistinctNetSet) RemoveAddr(ip netip.Addr) {
|
|||
|
||||
// Contains whether the given IP is contained in the set.
|
||||
func (s DistinctNetSet) Contains(ip net.IP) bool {
|
||||
addr, ok := netip.AddrFromSlice(ip)
|
||||
if !ok {
|
||||
panic(fmt.Errorf("invalid IP %v", ip))
|
||||
}
|
||||
return s.ContainsAddr(addr)
|
||||
return s.ContainsAddr(IPToAddr(ip))
|
||||
}
|
||||
|
||||
// Contains whether the given IP is contained in the set.
|
||||
|
|
|
|||
Loading…
Reference in a new issue