Skip to content

Commit

Permalink
chore: clean-up of #15151
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Feb 28, 2023
1 parent 44495e7 commit 652c7b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions x/gov/keeper/tally.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (keeper Keeper) Tally(ctx sdk.Context, proposal v1.Proposal) (passes bool,
percentVoting := totalVotingPower.Quo(sdk.NewDecFromInt(keeper.sk.TotalBondedTokens(ctx)))
quorum, _ := sdk.NewDecFromStr(params.Quorum)
if percentVoting.LT(quorum) {
return false, keeper.GetParams(ctx).BurnVoteQuorum, tallyResults
return false, params.BurnVoteQuorum, tallyResults
}

// If no one votes (everyone abstains), proposal fails
Expand All @@ -113,7 +113,7 @@ func (keeper Keeper) Tally(ctx sdk.Context, proposal v1.Proposal) (passes bool,
// If more than 1/3 of voters veto, proposal fails
vetoThreshold, _ := sdk.NewDecFromStr(params.VetoThreshold)
if results[v1.OptionNoWithVeto].Quo(totalVotingPower).GT(vetoThreshold) {
return false, keeper.GetParams(ctx).BurnVoteVeto, tallyResults
return false, params.BurnVoteVeto, tallyResults
}

// If more than 1/2 of non-abstaining voters vote Yes, proposal passes
Expand Down
3 changes: 0 additions & 3 deletions x/gov/migrations/v5/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.Binar
params.ExpeditedMinDeposit = defaultParams.ExpeditedMinDeposit
params.ExpeditedVotingPeriod = defaultParams.ExpeditedVotingPeriod
params.ExpeditedThreshold = defaultParams.ExpeditedThreshold
params.BurnProposalDepositPrevote = defaultParams.BurnProposalDepositPrevote
params.BurnVoteQuorum = defaultParams.BurnVoteQuorum
params.BurnVoteVeto = defaultParams.BurnVoteVeto

bz, err := cdc.Marshal(&params)
if err != nil {
Expand Down

0 comments on commit 652c7b9

Please sign in to comment.