handle empty blobs

This commit is contained in:
Agnish Ghosh 2024-07-07 00:43:24 +05:30
parent 755c24d6aa
commit abf58928cf
No known key found for this signature in database
GPG Key ID: 7BDDA05D1B25E9F8
1 changed files with 3 additions and 3 deletions

View File

@ -221,8 +221,10 @@ proc get_data_column_sidecars*(signed_block: deneb.SignedBeaconBlock |
cellsAndProofs: seq[KzgCellsAndKzgProofs]
kzg_incl_proof: array[4, Eth2Digest]
var sidecars = newSeqOfCap[DataColumnSidecar](CELLS_PER_EXT_BLOB)
if blobs.len == 0:
return ok(@[])
return ok(sidecars)
for blob in blobs:
let
@ -247,8 +249,6 @@ proc get_data_column_sidecars*(signed_block: deneb.SignedBeaconBlock |
for j in 0..<int(CELLS_PER_EXT_BLOB):
proofs[i][j] = (cellsAndProofs[i].proofs[j])
var sidecars = newSeqOfCap[DataColumnSidecar](CELLS_PER_EXT_BLOB)
for columnIndex in 0..<CELLS_PER_EXT_BLOB:
var column: DataColumn
var kzgProofOfColumn: KzgProofs