diff --git a/beacon_node/beacon_chain/src/beacon_chain.rs b/beacon_node/beacon_chain/src/beacon_chain.rs index a2fd6882734..33ff2791854 100644 --- a/beacon_node/beacon_chain/src/beacon_chain.rs +++ b/beacon_node/beacon_chain/src/beacon_chain.rs @@ -459,7 +459,7 @@ pub struct BeaconChain { pub enum BeaconBlockAndStateResponse { Full((BeaconBlock>, BeaconState)), Blinded((BeaconBlock>, BeaconState)), - BeaconBlockError() + BeaconBlockError(), } type BeaconBlockAndState = (BeaconBlock, BeaconState); @@ -4347,7 +4347,8 @@ impl BeaconChain { // // Perform the final steps of combining all the parts and computing the state root. let chain = self.clone(); - let result = self.task_executor + let result = self + .task_executor .spawn_blocking_handle( move || { chain.complete_partial_beacon_block( @@ -4362,14 +4363,15 @@ impl BeaconChain { .await .map_err(BlockProductionError::TokioJoin)?; - return Ok(BeaconBlockAndStateResponse::Full(result?)) + return Ok(BeaconBlockAndStateResponse::Full(result?)); } execution_layer::BlockProposalContentsType::Blinded(block_contents) => { // Part 3/3 (blocking) // // Perform the final steps of combining all the parts and computing the state root. - let chain = self.clone(); - let result = self.task_executor + let chain = self.clone(); + let result = self + .task_executor .spawn_blocking_handle( move || { chain.complete_partial_beacon_block( @@ -4384,7 +4386,7 @@ impl BeaconChain { .await .map_err(BlockProductionError::TokioJoin)?; - return Ok(BeaconBlockAndStateResponse::Blinded(result?)) + return Ok(BeaconBlockAndStateResponse::Blinded(result?)); } } } else { diff --git a/beacon_node/beacon_chain/src/errors.rs b/beacon_node/beacon_chain/src/errors.rs index 94afd6ad159..d7311774796 100644 --- a/beacon_node/beacon_chain/src/errors.rs +++ b/beacon_node/beacon_chain/src/errors.rs @@ -273,7 +273,7 @@ pub enum BlockProductionError { TokioJoin(tokio::task::JoinError), BeaconChain(BeaconChainError), InvalidPayloadFork, - FailedToFetchBlock + FailedToFetchBlock, } easy_from_to!(BlockProcessingError, BlockProductionError); diff --git a/beacon_node/execution_layer/src/lib.rs b/beacon_node/execution_layer/src/lib.rs index 7269747fb8f..d2c73955034 100644 --- a/beacon_node/execution_layer/src/lib.rs +++ b/beacon_node/execution_layer/src/lib.rs @@ -688,7 +688,7 @@ impl ExecutionLayer { &metrics::EXECUTION_LAYER_GET_PAYLOAD_SOURCE, &[metrics::LOCAL], ); - return Ok(BlockProposalContentsType::Full(block_proposal_contents)); + Ok(BlockProposalContentsType::Full(block_proposal_contents)) } BlockProposalContentsType::Blinded(block_proposal_contents) => { metrics::inc_counter_vec( @@ -699,7 +699,7 @@ impl ExecutionLayer { &metrics::EXECUTION_LAYER_GET_PAYLOAD_SOURCE, &[metrics::BUILDER], ); - return Ok(BlockProposalContentsType::Blinded(block_proposal_contents)); + Ok(BlockProposalContentsType::Blinded(block_proposal_contents)) } } }