Skip to content

Commit

Permalink
trusted reorg if it is not a trusted sequencer (0xPolygonHermez#1945)
Browse files Browse the repository at this point in the history
* trusted reorg if it is not a trusted sequencer

* halt
  • Loading branch information
ARR552 authored Mar 28, 2023
1 parent aefca38 commit 50da759
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion synchronizer/synchronizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,12 @@ func (s *ClientSynchronizer) checkTrustedState(batch state.Batch, tBatch *state.
if reorgReasons.Len() > 0 {
reason := reorgReasons.String()
log.Warnf("Trusted Reorg detected for Batch Number: %d. Reasons: %s", tBatch.BatchNumber, reason)
log.Fatal("TRUSTED REORG DETECTED! Batch: ", batch.BatchNumber)
if s.isTrustedSequencer {
for {
log.Error("TRUSTED REORG DETECTED! Batch: ", batch.BatchNumber)
time.Sleep(5 * time.Second) //nolint:gomnd
}
}
// Store trusted reorg register
tr := state.TrustedReorg{
BatchNumber: tBatch.BatchNumber,
Expand Down

0 comments on commit 50da759

Please sign in to comment.