mirror of
https://github.com/tendermint/tendermint.git
synced 2026-03-27 12:05:02 +00:00
fix rand
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user