From 403ff9f99656ec68a3c5ce32a52c48889843145b Mon Sep 17 00:00:00 2001 From: alan <652732310@qq.com> Date: Fri, 20 Sep 2024 16:02:03 +0800 Subject: [PATCH] show block number when "L2 safe head ahead of L2 unsafe head" happens --- op-batcher/batcher/driver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op-batcher/batcher/driver.go b/op-batcher/batcher/driver.go index fd56a1cebc6b..b9b57cb654d9 100644 --- a/op-batcher/batcher/driver.go +++ b/op-batcher/batcher/driver.go @@ -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