beacon, eth: null for missing cell

This commit is contained in:
healthykim 2026-06-10 01:40:10 +02:00
parent 8389557759
commit 4fbdd4c189
2 changed files with 8 additions and 6 deletions

View file

@ -158,8 +158,8 @@ type BlobAndProofV2 struct {
}
type BlobCellsAndProofsV1 struct {
BlobCells []hexutil.Bytes `json:"blob_cells"`
Proofs []hexutil.Bytes `json:"proofs"`
BlobCells []*hexutil.Bytes `json:"blob_cells"`
Proofs []*hexutil.Bytes `json:"proofs"`
}
// JSON type overrides for ExecutionPayloadEnvelope.

View file

@ -709,16 +709,18 @@ func (api *ConsensusAPI) GetBlobsV4(hashes []common.Hash, indicesBitarray types.
continue
}
hitCount++
blobCells := make([]hexutil.Bytes, len(cells[i]))
blobCells := make([]*hexutil.Bytes, len(cells[i]))
for j, cell := range cells[i] {
if cell != nil {
blobCells[j] = cell[:]
b := hexutil.Bytes(cell[:])
blobCells[j] = &b
}
}
blobProofs := make([]hexutil.Bytes, len(proofs[i]))
blobProofs := make([]*hexutil.Bytes, len(proofs[i]))
for j, proof := range proofs[i] {
if proof != nil {
blobProofs[j] = proof[:]
b := hexutil.Bytes(proof[:])
blobProofs[j] = &b
}
}
res[i] = &engine.BlobCellsAndProofsV1{