Skip to content

Commit

Permalink
fix blob_client_list
Browse files Browse the repository at this point in the history
  • Loading branch information
NazariiDenha committed Aug 15, 2024
1 parent 399dcfc commit 9e1769f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rollup/da_syncer/blob_client/blob_client_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (c *BlobClientList) GetBlobByVersionedHash(ctx context.Context, versionedHa

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

Expand Down
3 changes: 3 additions & 0 deletions rollup/da_syncer/da/commitV1.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ func NewCommitBatchDAV1WithBlobDecodeFunc(ctx context.Context, db ethdb.Database
if err != nil {
return nil, fmt.Errorf("failed to fetch blob from blob client, err: %w", err)
}
if blob == nil {
return nil, fmt.Errorf("unexpected, blob == nil and err != nil, batch index: %d, versionedHash: %s, blobClient: %T", batchIndex, versionedHash.String(), blobClient)
}

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

0 comments on commit 9e1769f

Please sign in to comment.