Skip to content

Commit

Permalink
add postblocker
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 committed Jan 11, 2024
1 parent 6a72028 commit ec699bc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,7 @@ func NewMinitiaApp(

// initialize BaseApp
app.SetInitChainer(app.InitChainer)
app.SetPreBlocker(app.PreBlocker)
app.SetBeginBlocker(app.BeginBlocker)
app.setPostHandler()
app.SetEndBlocker(app.EndBlocker)
Expand Down Expand Up @@ -851,6 +852,11 @@ func (app *MinitiaApp) setPostHandler() {
// Name returns the name of the App
func (app *MinitiaApp) Name() string { return app.BaseApp.Name() }

// PreBlocker application updates every pre block
func (app *MinitiaApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) {
return app.ModuleManager.PreBlock(ctx)
}

// BeginBlocker application updates every begin block
func (app *MinitiaApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error) {
return app.ModuleManager.BeginBlock(ctx)
Expand Down

0 comments on commit ec699bc

Please sign in to comment.