mirror of
https://github.com/tendermint/tendermint.git
synced 2026-05-13 10:41:30 +00:00
use numaddresses correctly
This commit is contained in:
@@ -1006,7 +1006,7 @@ RETRY:
|
||||
// peers is.
|
||||
|
||||
// nolint:gosec // G404: Use of weak random number generator
|
||||
if len(ranked) <= int(limit) || rand.Intn((idx+1)*2) <= idx+1 {
|
||||
if numAddresses <= 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