Skip to content

Commit d3830c1

Browse files
authored
Flush receipt with the correct state (#546)
## Describe your changes and provide context `stateToCommit` could be either `processProposalState` or `deliverState`, so we should flush to the correct one. This might not be causing issue yet though, since before receipt flush, we'd first write `stateToCommit` to the parent state, so that `deliverState` would fall through to parent which is already updated by `stateToCommit` ## Testing performed to validate your change existing test
1 parent 02f1c2f commit d3830c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

baseapp/abci.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ func (app *BaseApp) Commit(ctx context.Context) (res *abci.ResponseCommit, err e
372372
retainHeight := app.GetBlockRetentionHeight(header.Height)
373373

374374
if app.preCommitHandler != nil {
375-
if err := app.preCommitHandler(app.deliverState.ctx); err != nil {
375+
if err := app.preCommitHandler(app.stateToCommit.ctx); err != nil {
376376
panic(fmt.Errorf("error when executing commit handler: %s", err))
377377
}
378378
}

0 commit comments

Comments
 (0)