mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-19 21:56:22 +00:00
consensus: add some more checks to vote counting (#7253)
This commit is contained in:
@@ -372,6 +372,9 @@ func (voteSet *VoteSet) GetByIndex(valIndex int32) *Vote {
|
||||
}
|
||||
voteSet.mtx.Lock()
|
||||
defer voteSet.mtx.Unlock()
|
||||
if int(valIndex) >= len(voteSet.votes) {
|
||||
return nil
|
||||
}
|
||||
return voteSet.votes[valIndex]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user