Skip to content

Commit

Permalink
Check flushID != 0 in Sequencer (0xPolygonHermez#2415)
Browse files Browse the repository at this point in the history
* check flushid != 0 in sequencer

* Use f.halt instead of log.Fatal to report that flushid is 0

Co-authored-by: Toni Ramírez <[email protected]>

* fix lint

---------

Co-authored-by: Toni Ramírez <[email protected]>
  • Loading branch information
agnusmor and ToniRamirezM authored Aug 17, 2023
1 parent f494784 commit caf26bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sequencer/finalizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ func (f *finalizer) updateProverIdAndFlushId(ctx context.Context) {
if err != nil {
log.Errorf("failed to get stored flush id, Err: %v", err)
} else {
if storedFlushID == 0 {
f.halt(ctx, fmt.Errorf("storedFlushID is 0. Please check that prover/executor config parameter dbReadOnly is false"))
}
if storedFlushID != f.storedFlushID {
// Check if prover/Executor has been restarted
f.checkIfProverRestarted(proverID)
Expand Down

0 comments on commit caf26bd

Please sign in to comment.