cosmetic fixup for ensure extensions

This commit is contained in:
William Banfield
2022-05-15 22:52:35 -04:00
parent 4d33880dee
commit a3ec142a84

View File

@@ -1061,12 +1061,8 @@ func (commit *Commit) ToVoteSet(chainID string, vals *ValidatorSet) *VoteSet {
// EnsureExtensions validates that a vote extensions signature is present for
// every ExtendedCommitSig in the ExtendedCommit.
func (ec *ExtendedCommit) EnsureExtensions() error {
for idx, ecs := range ec.ExtendedSignatures {
if ecs.BlockIDFlag == BlockIDFlagAbsent {
continue
}
vote := ec.GetExtendedVote(int32(idx))
if err := vote.EnsureExtension(); err != nil {
for _, ecs := range ec.ExtendedSignatures {
if err := ecs.EnsureExtension(); err != nil {
return err
}
}