Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Nov 15, 2022
1 parent aa5ea76 commit 3d98efc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions x/group/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,16 @@ func (k Keeper) TallyProposalsAtVPEnd(ctx sdk.Context) error {
return sdkerrors.Wrap(err, "group")
}

// skip the invalid decision policies that could have been created before
// https://github.com/cosmos/cosmos-sdk/pull/13869
decisionPolicy, err := policyInfo.GetDecisionPolicy()
if err != nil {
return sdkerrors.Wrap(err, "decision policy")
}
if err := decisionPolicy.Validate(electorate, k.config); err != nil {
continue
}

proposalID := proposal.Id
if proposal.Status == group.PROPOSAL_STATUS_ABORTED || proposal.Status == group.PROPOSAL_STATUS_WITHDRAWN {
if err := k.pruneProposal(ctx, proposalID); err != nil {
Expand Down

0 comments on commit 3d98efc

Please sign in to comment.