Skip to content

Commit

Permalink
return a BlobsUnavailable error when the block root is a pre-4844 b…
Browse files Browse the repository at this point in the history
…lock
  • Loading branch information
realbigsean authored and emhane committed Jan 19, 2023
1 parent c734ea8 commit 3543b9a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion beacon_node/beacon_chain/src/beacon_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,10 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
// If there are no KZG commitments in the block, we know the sidecar should
// be empty.
let expected_kzg_commitments =
block.message().body().blob_kzg_commitments()?;
match block.message().body().blob_kzg_commitments() {
Ok(kzg_commitments) => kzg_commitments,
Err(_) => return Err(Error::BlobsUnavailable),
};
if expected_kzg_commitments.is_empty() {
Ok(Some(BlobsSidecar::empty_from_parts(
*block_root,
Expand Down

0 comments on commit 3543b9a

Please sign in to comment.