From ec699bcf4a3188f030a1ead0c7a6a8a3e676e2a4 Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Thu, 11 Jan 2024 13:31:11 +0900 Subject: [PATCH] add postblocker --- app/app.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/app.go b/app/app.go index c29c05e..a638c66 100644 --- a/app/app.go +++ b/app/app.go @@ -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) @@ -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)