fix: remove useless condition

This commit is contained in:
Richard Ramos 2022-11-29 16:11:34 -04:00 committed by RichΛrd
parent 982707e02c
commit 94d20ab122
1 changed files with 0 additions and 5 deletions

View File

@ -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()