Skip to content

Commit f4b586e

Browse files
committed
avoid returning error, as it cause consensus failure
1 parent ff64f09 commit f4b586e

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

x/compute/internal/keeper/keeper.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,18 +1126,6 @@ func (k Keeper) GetScheduledMsgs(ctx sdk.Context, execution_stage crontypes.Exec
11261126
txBytesList = append(txBytesList, txBytes)
11271127
executeMsgList = append(executeMsgList, executeMsg)
11281128

1129-
// Execute the contract.
1130-
// _, err = k.Execute(cacheCtx, executeMsg.Contract, executeMsg.Sender, executeMsg.Msg, executeMsg.SentFunds, executeMsg.CallbackSig, wasmTypes.HandleTypeExecute)
1131-
// if err != nil {
1132-
// ctx.Logger().Info("executeSchedule: failed to execute contract msg",
1133-
// "schedule_name", ExecuteScheduledMsgs.Name,
1134-
// "msg_idx", idx,
1135-
// "msg_contract", msg.Contract,
1136-
// "msg", msg.Msg,
1137-
// "error", err,
1138-
// )
1139-
// return err
1140-
// }
11411129
}
11421130

11431131
// Commit changes if all messages were executed successfully.

x/compute/module.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,11 @@ func (am AppModule) BeginBlock(c context.Context) error {
203203
for idx, msg := range execCronMsgs {
204204
fmt.Printf("idx, msg: %+v %+v\n", idx, msg)
205205
ctx = ctx.WithTxBytes(bytesCronMsgs[idx])
206-
res, err := am.keeper.Execute(ctx, msg.Contract, msg.Sender, msg.Msg, msg.SentFunds, msg.CallbackSig, wasmtypes.HandleTypeExecute)
206+
_, err := am.keeper.Execute(ctx, msg.Contract, msg.Sender, msg.Msg, msg.SentFunds, msg.CallbackSig, wasmtypes.HandleTypeExecute)
207207
if err != nil {
208208
ctx.Logger().Error("Failed to execute cron message", "error", err)
209-
return err
209+
// return err
210210
}
211-
fmt.Printf("res: %+v\n", res)
212211
}
213212

214213
fmt.Printf("setRandomSeed\n")

0 commit comments

Comments
 (0)