diff --git a/protocol/app/app.go b/protocol/app/app.go index 98e5cdacf39..d8e9fb4f799 100644 --- a/protocol/app/app.go +++ b/protocol/app/app.go @@ -1672,8 +1672,6 @@ func (app *App) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) { if err != nil { return response, err } - block := app.IndexerEventManager.ProduceBlock(ctx) - app.IndexerEventManager.SendOnchainData(block) return response, err } @@ -1682,6 +1680,8 @@ func (app *App) Precommitter(ctx sdk.Context) { if err := app.ModuleManager.Precommit(ctx); err != nil { panic(err) } + block := app.IndexerEventManager.ProduceBlock(ctx) + app.IndexerEventManager.SendOnchainData(block) } // PrepareCheckStater application updates after commit and before any check state is invoked.