Deneb review common/eth2 (#4698)

* Update comments and small cleanup.

* Deserialize into `SsePayloadAttributesV3` for Deneb fork. Update `SignedBlockContents::blobs_cloned` to return blobs for `BlindedBlockAndBlobSidecars`.

* Improve code readability and error handling when converting blinded block into full block.
This commit is contained in:
Jimmy Chen
2023-09-06 14:39:25 +10:00
committed by GitHub
parent 13606533b5
commit f9bea3c174
4 changed files with 37 additions and 34 deletions

View File

@@ -1729,7 +1729,7 @@ pub fn serve<T: BeaconChainTypes>(
);
/*
* beacon/blobs
* beacon/blob_sidecars
*/
// GET beacon/blob_sidecars/{block_id}

View File

@@ -373,8 +373,8 @@ pub async fn reconstruct_block<T: BeaconChainTypes>(
.try_into_full_block_and_blobs(Some(full_payload_contents))
.map(ProvenancedBlock::builder),
}
.ok_or_else(|| {
warp_utils::reject::custom_server_error("Unable to add payload to block".to_string())
.map_err(|e| {
warp_utils::reject::custom_server_error(format!("Unable to add payload to block: {e:?}"))
})
}