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

@@ -918,7 +918,7 @@ impl BeaconNodeHttpClient {
Ok(Some(response.json().await?))
}
/// `GET v1/beacon/blobs/{block_id}`
/// `GET v1/beacon/blob_sidecars/{block_id}`
///
/// Returns `Ok(None)` on a 404 error.
pub async fn get_blobs<T: EthSpec>(
@@ -931,8 +931,7 @@ impl BeaconNodeHttpClient {
None => return Ok(None),
};
let GenericResponse { data } = response.json().await?;
Ok(Some(GenericResponse { data }))
Ok(Some(response.json().await?))
}
/// `GET v1/beacon/blinded_blocks/{block_id}`