Skip to content

Commit 3c21f4e

Browse files
committed
address review comments
1 parent 6d5af23 commit 3c21f4e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

rollup/da_syncer/da/calldata_blob_source.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ func (ds *CalldataBlobSource) getCommitBatchDA(commitEvents []*l1.CommitBatchEve
240240
if entry, err = NewCommitBatchDAV1(ds.ctx, ds.db, ds.blobClient, codec, commitEvent, args.ParentBatchHeader, args.Chunks, args.SkippedL1MessageBitmap, args.BlobHashes, blockHeader.Time); err != nil {
241241
return nil, fmt.Errorf("failed to decode DA, batch index: %d, err: %w", commitEvent.BatchIndex().Uint64(), err)
242242
}
243-
case 7:
243+
default: // CodecVersion 7 and above
244244
if i >= len(args.BlobHashes) {
245245
return nil, fmt.Errorf("not enough blob hashes for commit transaction: %s, index in tx: %d, batch index: %d, hash: %s", firstCommitEvent.TxHash(), i, commitEvent.BatchIndex().Uint64(), commitEvent.BatchHash().Hex())
246246
}
@@ -256,8 +256,6 @@ func (ds *CalldataBlobSource) getCommitBatchDA(commitEvents []*l1.CommitBatchEve
256256
if entry, err = NewCommitBatchDAV7(ds.ctx, ds.db, ds.blobClient, codec, commitEvent, blobHash, parentBatchHash, blockHeader.Time); err != nil {
257257
return nil, fmt.Errorf("failed to decode DA, batch index: %d, err: %w", commitEvent.BatchIndex().Uint64(), err)
258258
}
259-
default:
260-
return nil, fmt.Errorf("failed to decode DA, codec version is unknown: codec version: %d", args.Version)
261259
}
262260

263261
previousEvent = commitEvent

0 commit comments

Comments
 (0)