Skip to content

Commit

Permalink
governance: fix delegator-validator vote match check
Browse files Browse the repository at this point in the history
Non breaking since this is just an early stop in loop to avoid a no-op -
adding and subtracting shares for the same vote.
  • Loading branch information
ptrus committed Nov 27, 2023
1 parent bdbd1cb commit cfc9a41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions go/consensus/cometbft/apps/governance/governance.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,9 @@ func (app *governanceApplication) closeProposal(
}
delegationToValidator = true
validatorVote := validatorVotes[to]
if validatorVote == &vote.Vote { //nolint:gosec
// Vote matches the delegated validator vote.

// Skip if vote matches the delegated validator vote.
if validatorVote != nil && *validatorVote == vote.Vote {
continue
}

Expand Down

0 comments on commit cfc9a41

Please sign in to comment.