mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 05:11:21 +00:00
lite: < len(v) in for loop check, as per @melekes' recommendation
Also lazily load the commits to only be run once when the benchmarks are activated, lest it slows down all the tests
This commit is contained in:
@ -77,10 +77,7 @@ func (v ValKeys) signHeader(header *types.Header, first, last int) *types.Commit
|
||||
vset := v.ToValidators(1, 0)
|
||||
|
||||
// fill in the votes we want
|
||||
for i := first; i < last; i++ {
|
||||
if i >= len(v) {
|
||||
break
|
||||
}
|
||||
for i := first; i < last && i < len(v); i++ {
|
||||
vote := makeVote(header, vset, v[i])
|
||||
votes[vote.ValidatorIndex] = vote
|
||||
}
|
||||
|
Reference in New Issue
Block a user