Skip to content

Commit

Permalink
move SendOnchainEvent from Endblocker to Precommitter
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyding committed Jun 3, 2024
1 parent 87b8b6a commit 60c64a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions protocol/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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.
Expand Down

0 comments on commit 60c64a6

Please sign in to comment.