cargo fmt

This commit is contained in:
realbigsean
2023-08-24 14:35:06 -04:00
parent f90b190d9a
commit 42b34dbbe4
10 changed files with 55 additions and 49 deletions

View File

@@ -241,7 +241,8 @@ pub fn validate_blob_sidecar_for_gossip<T: BeaconChainTypes>(
let Some(parent_block) = chain
.canonical_head
.fork_choice_read_lock()
.get_block(&block_parent_root) else {
.get_block(&block_parent_root)
else {
return Err(GossipBlobError::BlobParentUnknown(
signed_blob_sidecar.message,
));

View File

@@ -349,11 +349,8 @@ pub fn consistency_checks<T: EthSpec>(
block: &SignedBeaconBlock<T>,
blobs: &[Arc<BlobSidecar<T>>],
) -> Result<(), AvailabilityCheckError> {
let Ok(block_kzg_commitments) = block
.message()
.body()
.blob_kzg_commitments() else {
return Ok(())
let Ok(block_kzg_commitments) = block.message().body().blob_kzg_commitments() else {
return Ok(());
};
if blobs.len() != block_kzg_commitments.len() {

View File

@@ -586,8 +586,9 @@ impl<T: BeaconChainTypes> OverflowLRUCache<T> {
let Some(verified_blobs) = Vec::from(pending_components.verified_blobs)
.into_iter()
.take(num_blobs_expected)
.collect::<Option<Vec<_>>>() else {
return Ok(Availability::MissingComponents(import_data.block_root))
.collect::<Option<Vec<_>>>()
else {
return Ok(Availability::MissingComponents(import_data.block_root));
};
let available_block = make_available(block, verified_blobs)?;