Correctly set return code

This commit is contained in:
Christopher Goes 2018-11-12 17:25:13 +01:00
parent 81ae35c0f7
commit 2b3226854c

View File

@ -95,7 +95,8 @@ func SimulateMsgSubmitProposal(k gov.Keeper) simulation.Operation {
func simulateHandleMsgSubmitProposal(msg gov.MsgSubmitProposal, handler sdk.Handler, ctx sdk.Context, event func(string)) (action string, ok bool) {
ctx, _ = ctx.CacheContext()
handler(ctx, msg)
result := handler(ctx, msg)
ok = result.IsOK()
event(fmt.Sprintf("gov/MsgSubmitProposal/%v", ok))
action = fmt.Sprintf("TestMsgSubmitProposal: ok %v, msg %s", ok, msg.GetSignBytes())
return