diff --git a/waku/v2/discv5/discover.go b/waku/v2/discv5/discover.go index 493c502b..5a831ff5 100644 --- a/waku/v2/discv5/discover.go +++ b/waku/v2/discv5/discover.go @@ -3,7 +3,6 @@ package discv5 import ( "context" "crypto/ecdsa" - "errors" "math/rand" "net" "sync" @@ -382,10 +381,6 @@ func (d *DiscoveryV5) FindNodes(ctx context.Context, topic string, opts ...disco limit = MaxPeersToDiscover } - if limit > MaxPeersToDiscover { - return nil, errors.New("limit should be less than allowed maximum") - } - // We are ignoring the topic. Future versions might use a map[string]*peerCache instead where the string represents the pubsub topic d.peerCache.Lock()