Skip to content

Commit

Permalink
Always reset OE in FinalizeBlock (#57)
Browse files Browse the repository at this point in the history
Always abort OE in `FinalizeBlock`
  • Loading branch information
teddyding authored Oct 22, 2024
1 parent 4b1c1dc commit cc8c850
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,8 @@ func (app *BaseApp) FinalizeBlock(req *abci.RequestFinalizeBlock) (res *abci.Res
// Wait for the OE to finish, regardless of whether it was aborted or not
res, err = app.optimisticExec.WaitResult()

app.optimisticExec.Reset()

// only return if we are not aborting
if !aborted {
if res != nil {
Expand All @@ -921,7 +923,6 @@ func (app *BaseApp) FinalizeBlock(req *abci.RequestFinalizeBlock) (res *abci.Res

// if it was aborted, we need to reset the state
app.finalizeBlockState = nil
app.optimisticExec.Reset()
}

// if no OE is running, just run the block (this is either a block replay or a OE that got aborted)
Expand Down

0 comments on commit cc8c850

Please sign in to comment.