Skip to content

Commit

Permalink
polygon/sync: more informative err for bad block at finalized waypoint (
Browse files Browse the repository at this point in the history
  • Loading branch information
taratorio authored Oct 31, 2024
1 parent d4af6de commit 525bb55
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions polygon/sync/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,7 @@ func (s *Sync) handleWaypointExecutionErr(ctx context.Context, lastCorrectTip *t
return execErr
}

execErr = fmt.Errorf("unexpected bad block at finalized waypoint: %w", execErr)
// if it is a bad block try to unwind the bridge to the last known tip so we leave it in a good state
if bridgeUnwindErr := s.bridgeSync.Unwind(ctx, lastCorrectTip.Number.Uint64()); bridgeUnwindErr != nil {
return fmt.Errorf("%w: %w", bridgeUnwindErr, execErr)
Expand Down

0 comments on commit 525bb55

Please sign in to comment.