mirror of
https://github.com/tendermint/tendermint.git
synced 2026-03-27 20:15:21 +00:00
@@ -877,6 +877,10 @@ func (m *PeerManager) Advertise(peerID types.NodeID, limit uint16) []NodeAddress
|
||||
addresses[i], addresses[j] = addresses[j], addresses[i]
|
||||
})
|
||||
|
||||
if len(addresses) <= int(limit) {
|
||||
return addresses
|
||||
}
|
||||
|
||||
return addresses[:limit-1]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user