diff --git a/crates/consensus/beacon/src/engine/mod.rs b/crates/consensus/beacon/src/engine/mod.rs index 5b54db535014..3a7aa1c9575c 100644 --- a/crates/consensus/beacon/src/engine/mod.rs +++ b/crates/consensus/beacon/src/engine/mod.rs @@ -1513,7 +1513,7 @@ where warn!(target: "consensus::engine", invalid_hash=?bad_block.hash(), invalid_number=?bad_block.number, "Bad block detected in unwind"); // update the `invalid_headers` cache with the new invalid header self.invalid_headers.insert(*bad_block); - return Ok(()); + return Ok(()) } let sync_target_state = match self.forkchoice_state_tracker.sync_target_state() { diff --git a/crates/rpc/rpc-builder/src/lib.rs b/crates/rpc/rpc-builder/src/lib.rs index 2fb8f72c4559..e59d6bcaf8aa 100644 --- a/crates/rpc/rpc-builder/src/lib.rs +++ b/crates/rpc/rpc-builder/src/lib.rs @@ -2031,7 +2031,7 @@ impl TransportRpcModules { /// Returns [Ok(false)] if no ws transport is configured. pub fn merge_ws(&mut self, other: impl Into) -> Result { if let Some(ref mut ws) = self.ws { - return ws.merge(other.into()).map(|_| true); + return ws.merge(other.into()).map(|_| true) } Ok(false) } diff --git a/crates/rpc/rpc-engine-api/src/engine_api.rs b/crates/rpc/rpc-engine-api/src/engine_api.rs index 6e9c5009182f..5358c68eb36d 100644 --- a/crates/rpc/rpc-engine-api/src/engine_api.rs +++ b/crates/rpc/rpc-engine-api/src/engine_api.rs @@ -443,7 +443,7 @@ where ) -> EngineApiResult { let len = hashes.len() as u64; if len > MAX_PAYLOAD_BODIES_LIMIT { - return Err(EngineApiError::PayloadRequestTooLarge { len }); + return Err(EngineApiError::PayloadRequestTooLarge { len }) } let mut result = Vec::with_capacity(hashes.len()); @@ -483,7 +483,7 @@ where return Err(EngineApiError::TerminalTD { execution: merge_terminal_td, consensus: terminal_total_difficulty, - }); + }) } self.inner.beacon_consensus.transition_configuration_exchanged().await; @@ -493,7 +493,7 @@ where return Ok(TransitionConfiguration { terminal_total_difficulty: merge_terminal_td, ..Default::default() - }); + }) } // Attempt to look up terminal block hash @@ -561,9 +561,9 @@ where // TODO: decide if we want this branch - the FCU INVALID response might be more // useful than the payload attributes INVALID response if fcu_res.is_invalid() { - return Ok(fcu_res); + return Ok(fcu_res) } - return Err(err.into()); + return Err(err.into()) } } @@ -593,10 +593,7 @@ where /// Handler for `engine_newPayloadV2` /// See also - async fn new_payload_v2( - &self, - payload: TaikoExecutionPayloadInputV2, - ) -> RpcResult { + async fn new_payload_v2(&self, payload: TaikoExecutionPayloadInputV2) -> RpcResult { trace!(target: "rpc::engine", "Serving engine_newPayloadV2"); let start = Instant::now(); let gas_used = payload.execution_payload.execution_payload.gas_used; @@ -1002,8 +999,8 @@ mod tests { blocks .iter() .filter(|b| { - !first_missing_range.contains(&b.number) - && !second_missing_range.contains(&b.number) + !first_missing_range.contains(&b.number) && + !second_missing_range.contains(&b.number) }) .map(|b| (b.hash(), b.clone().unseal())), ); @@ -1032,8 +1029,8 @@ mod tests { // ensure we still return trailing `None`s here because by-hash will not be aware // of the missing block's number, and cannot compare it to the current best block .map(|b| { - if first_missing_range.contains(&b.number) - || second_missing_range.contains(&b.number) + if first_missing_range.contains(&b.number) || + second_missing_range.contains(&b.number) { None } else { @@ -1059,8 +1056,8 @@ mod tests { let (handle, api) = setup_engine_api(); let transition_config = TransitionConfiguration { - terminal_total_difficulty: handle.chain_spec.fork(Hardfork::Paris).ttd().unwrap() - + U256::from(1), + terminal_total_difficulty: handle.chain_spec.fork(Hardfork::Paris).ttd().unwrap() + + U256::from(1), ..Default::default() }; diff --git a/crates/rpc/rpc-types-compat/src/transaction/mod.rs b/crates/rpc/rpc-types-compat/src/transaction/mod.rs index b885a8dcb8a2..5f40293c057a 100644 --- a/crates/rpc/rpc-types-compat/src/transaction/mod.rs +++ b/crates/rpc/rpc-types-compat/src/transaction/mod.rs @@ -1,9 +1,7 @@ //! Compatibility functions for rpc `Transaction` type. use alloy_rpc_types::request::{TransactionInput, TransactionRequest}; -use reth_primitives::{ - Address, BlockNumber, TransactionSigned, TransactionSignedEcRecovered, TxKind, TxType, B256, -}; +use reth_primitives::{Address, BlockNumber, TransactionSigned, TransactionSignedEcRecovered, TxKind, TxType, B256}; use reth_rpc_types::Transaction; use signature::from_primitive_signature; pub use typed::*; diff --git a/crates/rpc/rpc/src/eth/api/server.rs b/crates/rpc/rpc/src/eth/api/server.rs index dc242a0224fe..f238b4da079a 100644 --- a/crates/rpc/rpc/src/eth/api/server.rs +++ b/crates/rpc/rpc/src/eth/api/server.rs @@ -328,7 +328,7 @@ where /// Handler for: `eth_blobBaseFee` async fn blob_base_fee(&self) -> Result { trace!(target: "rpc::eth", "Serving eth_blobBaseFee"); - return Ok(Self::blob_base_fee(self).await?); + return Ok(Self::blob_base_fee(self).await?) } // FeeHistory is calculated based on lazy evaluation of fees for historical blocks, and further diff --git a/crates/rpc/rpc/src/eth/cache/mod.rs b/crates/rpc/rpc/src/eth/cache/mod.rs index 9a1ef4f0c5a8..cfbe68311ee3 100644 --- a/crates/rpc/rpc/src/eth/cache/mod.rs +++ b/crates/rpc/rpc/src/eth/cache/mod.rs @@ -25,7 +25,6 @@ use tokio::sync::{ oneshot, Semaphore, }; use tokio_stream::wrappers::UnboundedReceiverStream; -use tracing::debug; mod config; pub use config::*; @@ -362,7 +361,6 @@ where } fn on_reorg_block(&mut self, block_hash: B256, res: ProviderResult>) { - debug!(target:"rpc::cache", "reorg block: {:?}", block_hash); if let Some(queued) = self.full_block_cache.remove(&block_hash) { // send the response to queued senders for tx in queued { @@ -422,7 +420,7 @@ where CacheAction::GetBlockWithSenders { block_hash, response_tx } => { if let Some(block) = this.full_block_cache.get(&block_hash).cloned() { let _ = response_tx.send(Ok(Some(block))); - continue; + continue } // block is not in the cache, request it if this is the first consumer @@ -450,7 +448,7 @@ where // check if block is cached if let Some(block) = this.full_block_cache.get(&block_hash) { let _ = response_tx.send(Ok(Some(block.body.clone()))); - continue; + continue } // block is not in the cache, request it if this is the first consumer @@ -478,7 +476,7 @@ where // check if block is cached if let Some(receipts) = this.receipts_cache.get(&block_hash).cloned() { let _ = response_tx.send(Ok(Some(receipts))); - continue; + continue } // block is not in the cache, request it if this is the first consumer @@ -502,7 +500,7 @@ where // check if env data is cached if let Some(env) = this.evm_env_cache.get(&block_hash).cloned() { let _ = response_tx.send(Ok(env)); - continue; + continue } // env data is not in the cache, request it if this is the first diff --git a/crates/stages/stages/src/stages/execution.rs b/crates/stages/stages/src/stages/execution.rs index a60745ffcaab..0db2686a3e23 100644 --- a/crates/stages/stages/src/stages/execution.rs +++ b/crates/stages/stages/src/stages/execution.rs @@ -199,7 +199,7 @@ where input: ExecInput, ) -> Result { if input.target_reached() { - return Ok(ExecOutput::done(input.checkpoint())); + return Ok(ExecOutput::done(input.checkpoint())) } let start_block = input.next_block();