From 18cc8d7a74fa97375e20bd8a214c0c19fd97bc61 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 17 Jul 2024 17:55:00 +0800 Subject: [PATCH] change log.Crit to log.Error --- rollup/rollup_sync_service/rollup_sync_service.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rollup/rollup_sync_service/rollup_sync_service.go b/rollup/rollup_sync_service/rollup_sync_service.go index 91b22fd90e1c..5e69190a0d1f 100644 --- a/rollup/rollup_sync_service/rollup_sync_service.go +++ b/rollup/rollup_sync_service/rollup_sync_service.go @@ -263,7 +263,9 @@ func (s *RollupSyncService) parseAndUpdateRollupEventLogs(logs []types.Log, endB } if err := batchWriter.Write(); err != nil { - log.Crit("Failed to write finalized batch meta to database", "err", err) + log.Error("fatal: failed to batch write finalized batch meta to database", "startBatchIndex", startBatchIndex, "endBatchIndex", batchIndex, + "batchCount", batchIndex-startBatchIndex+1, "highestFinalizedBlockNumber", highestFinalizedBlockNumber, "err", err) + return fmt.Errorf("failed to batch write finalized batch meta to database: %w", err) } rawdb.WriteFinalizedL2BlockNumber(s.db, highestFinalizedBlockNumber) rawdb.WriteLastFinalizedBatchIndex(s.db, batchIndex)