Skip to content

Commit 9e1769f

Browse files
committed
fix blob_client_list
1 parent 399dcfc commit 9e1769f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

rollup/da_syncer/blob_client/blob_client_list.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func (c *BlobClientList) GetBlobByVersionedHash(ctx context.Context, versionedHa
3030

3131
for i := 0; i < len(c.list); i++ {
3232
blob, err := c.list[c.nextPos()].GetBlobByVersionedHash(ctx, versionedHash)
33-
if err != nil {
33+
if err == nil {
3434
return blob, nil
3535
}
3636

rollup/da_syncer/da/commitV1.go

+3
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ func NewCommitBatchDAV1WithBlobDecodeFunc(ctx context.Context, db ethdb.Database
5959
if err != nil {
6060
return nil, fmt.Errorf("failed to fetch blob from blob client, err: %w", err)
6161
}
62+
if blob == nil {
63+
return nil, fmt.Errorf("unexpected, blob == nil and err != nil, batch index: %d, versionedHash: %s, blobClient: %T", batchIndex, versionedHash.String(), blobClient)
64+
}
6265

6366
// compute blob versioned hash and compare with one from tx
6467
c, err := kzg4844.BlobToCommitment(blob)

0 commit comments

Comments
 (0)