@@ -158,26 +158,23 @@ func (am AppModule) BeginBlock(c context.Context) error {
158158 ctx .Logger ().Error ("Failed to get scheduled cron msgs" )
159159 return err
160160 }
161+ // hash := sha256.Sum256([]byte("random"))
162+ // block_header.ImplicitHash = hash[:]
163+ // block_header.AppHash = hash[:]
161164
162165 cron_msgs := tm_type.Data {Txs : bytesCronMsgs }
163166 cron_data , err := cron_msgs .Marshal ()
164167 if err != nil {
165168 ctx .Logger ().Error ("Failed to marshal cron_msgs" )
166169 return err
167170 }
168- // hash := sha256.Sum256(cron_data)
169171
170172 header , err := block_header .Marshal ()
171173 if err != nil {
172174 ctx .Logger ().Error ("Failed to marshal block header" )
173175 return err
174176 }
175177
176- // fmt.Printf("---------------bytesCronMsgs--------------\n%+v\n", bytesCronMsgs)
177- // fmt.Printf("---------------execCronMsgs--------------\n%+v\n", execCronMsgs)
178- // fmt.Printf("ImplicitHash: %+v\n", hex.EncodeToString(hash[:]))
179- // fmt.Printf("beginBlock: block_header: %+v\n", block_header)
180-
181178 commit := ctx .Commit ()
182179 b_commit , err := commit .Marshal ()
183180 if err != nil {
@@ -222,8 +219,6 @@ func (am AppModule) BeginBlock(c context.Context) error {
222219// EndBlock returns the end blocker for the compute module.
223220func (am AppModule ) EndBlock (c context.Context ) error {
224221 ctx := c .(sdk.Context )
225- block_header := ctx .BlockHeader ()
226- fmt .Printf ("endBlock: block_header: %+v\n " , block_header )
227222
228223 _ , bytesCronMsgs , err := am .keeper .GetScheduledMsgs (ctx , crontypes .ExecutionStage_EXECUTION_STAGE_END_BLOCKER )
229224 if err != nil {
@@ -245,7 +240,6 @@ func (am AppModule) EndBlock(c context.Context) error {
245240 ctx .Logger ().Error ("Failed to set implicit hash %+v" , err )
246241 return err
247242 }
248- fmt .Printf ("---------------EndBlock--------------\n " )
249243 return nil
250244}
251245
0 commit comments