BeginBlocker is a function in which application updates every begin block
(ctx sdk.Context)
| 444 | |
| 445 | // BeginBlocker is a function in which application updates every begin block |
| 446 | func (app *AkashApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error) { |
| 447 | if patch, exists := utypes.GetHeightPatchesList()[ctx.BlockHeight()]; exists { |
| 448 | app.Logger().Info(fmt.Sprintf("found patch %s for current height %d. applying...", patch.Name(), ctx.BlockHeight())) |
| 449 | patch.Begin(ctx, &app.Keepers) |
| 450 | app.Logger().Info(fmt.Sprintf("patch %s applied successfully at height %d", patch.Name(), ctx.BlockHeight())) |
| 451 | } |
| 452 | |
| 453 | return app.MM.BeginBlock(ctx) |
| 454 | } |
| 455 | |
| 456 | // EndBlocker is a function in which an application updates every end block |
| 457 | func (app *AkashApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) { |
nothing calls this directly
no test coverage detected