Skip to content

Commit

Permalink
show block number when "L2 safe head ahead of L2 unsafe head" happens (
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqiangxu authored Sep 20, 2024
1 parent af357f1 commit bd50ac6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion op-batcher/batcher/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ func (l *BatchSubmitter) calculateL2BlockRangeToStore(ctx context.Context) (eth.

// Check if we should even attempt to load any blocks. TODO: May not need this check
if syncStatus.SafeL2.Number >= syncStatus.UnsafeL2.Number {
return eth.BlockID{}, eth.BlockID{}, errors.New("L2 safe head ahead of L2 unsafe head")
return eth.BlockID{}, eth.BlockID{}, fmt.Errorf("L2 safe head(%d) ahead of L2 unsafe head(%d)", syncStatus.SafeL2.Number, syncStatus.UnsafeL2.Number)
}

return l.lastStoredBlock, syncStatus.UnsafeL2.ID(), nil
Expand Down

0 comments on commit bd50ac6

Please sign in to comment.