Skip to content

Commit

Permalink
op-wheel: harden against missing safe/finalized heads (ethereum-optim…
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianst authored Aug 13, 2024
1 parent 0c42648 commit da68567
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions op-wheel/engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,10 @@ func Rewind(ctx context.Context, lgr log.Logger, client *sources.EngineAPIClient

// when rewinding, don't increase unsafe/finalized tags
toSafe, toFinalized := toUnsafe, toUnsafe
if safe.Number.Uint64() < to {
if safe != nil && safe.Number.Uint64() < to {
toSafe = eth.HeaderBlockID(safe)
}
if finalized.Number.Uint64() < to {
if finalized != nil && finalized.Number.Uint64() < to {
toFinalized = eth.HeaderBlockID(finalized)
}

Expand Down

0 comments on commit da68567

Please sign in to comment.