MCPcopy Create free account
hub / github.com/akash-network/node / BeginBlocker

Method BeginBlocker

app/app.go:446–454  ·  view source on GitHub ↗

BeginBlocker is a function in which application updates every begin block

(ctx sdk.Context)

Source from the content-addressed store, hash-verified

444
445// BeginBlocker is a function in which application updates every begin block
446func (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
457func (app *AkashApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) {

Callers

nothing calls this directly

Calls 5

BeginMethod · 0.80
NameMethod · 0.65
InfoMethod · 0.45
LoggerMethod · 0.45
BeginBlockMethod · 0.45

Tested by

no test coverage detected