diff --git a/beacon_node/beacon_chain/src/early_attester_cache.rs b/beacon_node/beacon_chain/src/early_attester_cache.rs index d8382481f..1216d5d4d 100644 --- a/beacon_node/beacon_chain/src/early_attester_cache.rs +++ b/beacon_node/beacon_chain/src/early_attester_cache.rs @@ -77,7 +77,7 @@ impl EarlyAttesterCache { source, target, block, - blobs: blobs.map_err(|_|Error::MissingBlobs)?, + blobs: blobs.map_err(|_| Error::MissingBlobs)?, proto_block, }; diff --git a/consensus/types/src/blobs_sidecar.rs b/consensus/types/src/blobs_sidecar.rs index d51d35d1c..f43a2e650 100644 --- a/consensus/types/src/blobs_sidecar.rs +++ b/consensus/types/src/blobs_sidecar.rs @@ -1,6 +1,6 @@ -use derivative::Derivative; use crate::test_utils::TestRandom; use crate::{Blob, EthSpec, Hash256, SignedRoot, Slot}; +use derivative::Derivative; use kzg::KzgProof; use serde_derive::{Deserialize, Serialize}; use ssz::Encode; @@ -11,7 +11,7 @@ use tree_hash_derive::TreeHash; #[cfg_attr(feature = "arbitrary-fuzz", derive(arbitrary::Arbitrary))] #[derive( - Debug, Clone, Serialize, Deserialize, Encode, Decode, TreeHash, Default, TestRandom, Derivative + Debug, Clone, Serialize, Deserialize, Encode, Decode, TreeHash, Default, TestRandom, Derivative, )] #[serde(bound = "T: EthSpec")] #[derivative(PartialEq, Hash(bound = "T: EthSpec"))] diff --git a/consensus/types/src/signed_block_and_blobs.rs b/consensus/types/src/signed_block_and_blobs.rs index fead50f38..f21545f27 100644 --- a/consensus/types/src/signed_block_and_blobs.rs +++ b/consensus/types/src/signed_block_and_blobs.rs @@ -1,11 +1,11 @@ use crate::signed_beacon_block::BlobReconstructionError; use crate::{BlobsSidecar, EthSpec, Hash256, SignedBeaconBlock, SignedBeaconBlockEip4844, Slot}; +use derivative::Derivative; use serde_derive::{Deserialize, Serialize}; use ssz::{Decode, DecodeError}; use ssz_derive::{Decode, Encode}; use std::sync::Arc; use tree_hash_derive::TreeHash; -use derivative::Derivative; #[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode, TreeHash, PartialEq)] #[serde(bound = "T: EthSpec")] @@ -93,14 +93,20 @@ impl BlockWrapper { self.block().parent_root() } - pub fn deconstruct(self, block_root: Option) -> (Arc>, Result>>, BlobReconstructionError>) { + pub fn deconstruct( + self, + block_root: Option, + ) -> ( + Arc>, + Result>>, BlobReconstructionError>, + ) { match self { BlockWrapper::Block(block) => { let blobs = block .reconstruct_empty_blobs(block_root) .map(|blob_opt| blob_opt.map(Arc::new)); - (block,blobs) - } , + (block, blobs) + } BlockWrapper::BlockAndBlob(block_sidecar_pair) => { let SignedBeaconBlockAndBlobsSidecar { beacon_block,