Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit 6b49ba8

Browse files
authored
Fix/rom error (#3177)
* fix rom error * linter * fix
1 parent efbd360 commit 6b49ba8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

state/batchV2.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ func (s *State) ProcessAndStoreClosedBatchV2(ctx context.Context, processingCtx
378378
return common.Hash{}, noFlushID, noProverID, err
379379
}
380380
processed, err := s.processBatchV2(ctx, &processingCtx, caller, dbTx)
381-
if err != nil {
381+
if err != nil && processed.ErrorRom == executor.RomError_ROM_ERROR_NO_ERROR {
382382
log.Errorf("%s error processBatchV2: %v", debugPrefix, err)
383383
return common.Hash{}, noFlushID, noProverID, err
384384
}
@@ -392,7 +392,7 @@ func (s *State) ProcessAndStoreClosedBatchV2(ctx context.Context, processingCtx
392392
log.Errorf("%s error isRomOOCError: %v", debugPrefix, err)
393393
}
394394

395-
if len(processedBatch.BlockResponses) > 0 && !processedBatch.IsRomOOCError {
395+
if len(processedBatch.BlockResponses) > 0 && !processedBatch.IsRomOOCError && processedBatch.RomError_V2 == nil {
396396
for _, blockResponse := range processedBatch.BlockResponses {
397397
err = s.StoreL2Block(ctx, processingCtx.BatchNumber, blockResponse, nil, dbTx)
398398
if err != nil {

0 commit comments

Comments
 (0)