Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style(x/gov): invert & simplify EndBlocker conditions for expedited proposals #16850

Merged
merged 1 commit into from
Jul 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: x/gov: invert & simplify EndBlocker conditions for expedited pro…
…posals

Inverts the condtion for updating deposits for either failing or unexpedited
proposals to make it simpler to read and maintain for the future.

Fixes #16807
  • Loading branch information
odeke-em committed Jul 6, 2023
commit 2efb2b3487c29c0fe808b4c0e54b82c8048035ab
2 changes: 1 addition & 1 deletion x/gov/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) error {
// the deposit at this point since the proposal is converted to regular.
// As a result, the deposits are either deleted or refunded in all cases
// EXCEPT when an expedited proposal fails.
if !(proposal.Expedited && !passes) {
if passes || !proposal.Expedited {
if burnDeposits {
err = keeper.DeleteAndBurnDeposits(ctx, proposal.Id)
} else {
Expand Down