This commit is contained in:
tycho garen
2022-06-16 15:57:17 -04:00
parent acd12b9918
commit 3f5b12d5d4

View File

@@ -983,7 +983,7 @@ RETRY:
// peers is.
// nolint:gosec // G404: Use of weak random number generator
if len(ranked) <= int(limit) || rand.Intn((idx+1)*2) <= idx {
if len(ranked) <= int(limit) || rand.Intn((idx+1)*2) <= idx+1 {
seenAddresses[addressInfo.Address] = struct{}{}
addresses = append(addresses, addressInfo.Address)
addedLastIteration = true