diff --git a/storage/memorybysubnet/peer_store.go b/storage/memorybysubnet/peer_store.go index e69a993..7253ebd 100644 --- a/storage/memorybysubnet/peer_store.go +++ b/storage/memorybysubnet/peer_store.go @@ -133,18 +133,14 @@ type swarm struct { func (s swarm) lenSeeders() (i int) { for _, subnet := range s.seeders { - for range subnet { - i++ - } + i += len(subnet) } return } func (s swarm) lenLeechers() (i int) { for _, subnet := range s.leechers { - for range subnet { - i++ - } + i += len(subnet) } return }