Skip to content

Commit

Permalink
Merge pull request #44 from 0xPolygon/avalkov/fix-gov-cli
Browse files Browse the repository at this point in the history
Fix gov cli
  • Loading branch information
avalkov authored Feb 12, 2025
2 parents e3ec567 + feaa1b0 commit 8bf4482
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion x/gov/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ func NewTxCmd(legacyPropCmds []*cobra.Command) *cobra.Command {
govTxCmd.AddCommand(
NewCmdDeposit(),
NewCmdVote(),
NewCmdWeightedVote(),
NewCmdSubmitProposal(),
NewCmdDraftProposal(),
NewCmdCancelProposal(),
Expand Down
4 changes: 3 additions & 1 deletion x/gov/keeper/tally.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package keeper

import (
"context"
"strings"

"cosmossdk.io/collections"
"cosmossdk.io/math"
Expand Down Expand Up @@ -32,7 +33,7 @@ func (keeper Keeper) Tally(ctx context.Context, proposal v1.Proposal) (passes, b
if err != nil {
return true
}
currValidators[validator.GetOperator()] = v1.NewValidatorGovInfo(
currValidators[strings.ToLower(validator.GetOperator())] = v1.NewValidatorGovInfo(
valBz,
// HV2: using validator.GetBondedTokens() as custom staking module will return the validator's VotingPower for it
validator.GetBondedTokens(),
Expand All @@ -59,6 +60,7 @@ func (keeper Keeper) Tally(ctx context.Context, proposal v1.Proposal) (passes, b
if err != nil {
return false, err
}
valAddrStr = strings.ToLower(valAddrStr)
if val, ok := currValidators[valAddrStr]; ok {
val.Vote = vote.Options
currValidators[valAddrStr] = val
Expand Down

0 comments on commit 8bf4482

Please sign in to comment.