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 committed Sep 20, 2024
1 parent fbf69c9 commit 403ff9f
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 403ff9f

Please sign in to comment.