@@ -16,11 +16,9 @@ import (
1616 sdk "github.com/cosmos/cosmos-sdk/types"
1717 "github.com/cosmos/cosmos-sdk/types/module"
1818 "github.com/scrtlabs/SecretNetwork/go-cosmwasm/api"
19- wasmtypes "github.com/scrtlabs/SecretNetwork/go-cosmwasm/types"
2019 "github.com/scrtlabs/SecretNetwork/x/compute/client/cli"
2120 "github.com/scrtlabs/SecretNetwork/x/compute/internal/keeper"
2221 "github.com/scrtlabs/SecretNetwork/x/compute/internal/types"
23- crontypes "github.com/scrtlabs/SecretNetwork/x/cron/types"
2422 tmenclave "github.com/scrtlabs/tm-secret-enclave"
2523)
2624
@@ -161,13 +159,13 @@ func (am AppModule) BeginBlock(c context.Context) error {
161159 ctx := c .(sdk.Context )
162160 block_header := ctx .BlockHeader ()
163161
164- execCronMsgs , bytesCronMsgs , err := am .keeper .GetScheduledMsgs (ctx , crontypes .ExecutionStage_EXECUTION_STAGE_BEGIN_BLOCKER )
165- if err != nil {
166- ctx .Logger ().Error ("Failed to get scheduled cron msgs" )
167- return err
168- }
162+ // execCronMsgs, bytesCronMsgs, err := am.keeper.GetScheduledMsgs(ctx, crontypes.ExecutionStage_EXECUTION_STAGE_BEGIN_BLOCKER)
163+ // if err != nil {
164+ // ctx.Logger().Error("Failed to get scheduled cron msgs")
165+ // return err
166+ // }
169167
170- cron_msgs := tm_type.Data {Txs : bytesCronMsgs }
168+ cron_msgs := tm_type.Data {Txs : [][] byte {} }
171169 cron_data , err := cron_msgs .Marshal ()
172170 if err != nil {
173171 ctx .Logger ().Error ("Failed to marshal cron_msgs" )
@@ -202,13 +200,13 @@ func (am AppModule) BeginBlock(c context.Context) error {
202200 return err
203201 }
204202
205- for idx , msg := range execCronMsgs {
206- ctx = ctx .WithTxBytes (bytesCronMsgs [idx ])
207- _ , err := am .keeper .Execute (ctx , msg .Contract , msg .Sender , msg .Msg , msg .SentFunds , msg .CallbackSig , wasmtypes .HandleTypeExecute )
208- if err != nil {
209- ctx .Logger ().Error ("Failed to execute cron message" , "error" , err )
210- }
211- }
203+ // for idx, msg := range execCronMsgs {
204+ // ctx = ctx.WithTxBytes(bytesCronMsgs[idx])
205+ // _, err := am.keeper.Execute(ctx, msg.Contract, msg.Sender, msg.Msg, msg.SentFunds, msg.CallbackSig, wasmtypes.HandleTypeExecute)
206+ // if err != nil {
207+ // ctx.Logger().Error("Failed to execute cron message", "error", err)
208+ // }
209+ // }
212210
213211 am .keeper .SetRandomSeed (ctx , random , validator_set_evidence )
214212 } else {
@@ -221,13 +219,13 @@ func (am AppModule) BeginBlock(c context.Context) error {
221219func (am AppModule ) EndBlock (c context.Context ) error {
222220 ctx := c .(sdk.Context )
223221
224- _ , bytesCronMsgs , err := am .keeper .GetScheduledMsgs (ctx , crontypes .ExecutionStage_EXECUTION_STAGE_END_BLOCKER )
225- if err != nil {
226- ctx .Logger ().Error ("Failed to get scheduled cron msgs" )
227- return err
228- }
222+ // _, _ , err := am.keeper.GetScheduledMsgs(ctx, crontypes.ExecutionStage_EXECUTION_STAGE_END_BLOCKER)
223+ // if err != nil {
224+ // ctx.Logger().Error("Failed to get scheduled cron msgs")
225+ // return err
226+ // }
229227
230- cron_msgs := tm_type.Data {Txs : bytesCronMsgs }
228+ cron_msgs := tm_type.Data {Txs : [][] byte {} }
231229 cron_data , err := cron_msgs .Marshal ()
232230 if err != nil {
233231 ctx .Logger ().Error ("Failed to marshal cron_msgs" )
0 commit comments