Skip to content

Commit 70c0775

Browse files
authored
fix: fix gov sims (#14969)
1 parent 1133b6b commit 70c0775

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

x/gov/simulation/operations.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,10 @@ func SimulateMsgCancelProposal(ak types.AccountKeeper, bk types.BankKeeper, k *k
448448
return simtypes.NoOpMsg(types.ModuleName, TypeMsgCancelProposal, "invalid proposer"), nil, nil
449449
}
450450

451+
if (proposal.Status != v1.StatusDepositPeriod) && (proposal.Status != v1.StatusVotingPeriod) {
452+
return simtypes.NoOpMsg(types.ModuleName, TypeMsgCancelProposal, "invalid proposal status"), nil, nil
453+
}
454+
451455
account := ak.GetAccount(ctx, simAccount.Address)
452456
spendable := bk.SpendableCoins(ctx, account.GetAddress())
453457

0 commit comments

Comments
 (0)