diff --git a/crates/rpc/rpc-eth-types/src/cache/mod.rs b/crates/rpc/rpc-eth-types/src/cache/mod.rs index 5f7fddd15356..b27ca7dadb52 100644 --- a/crates/rpc/rpc-eth-types/src/cache/mod.rs +++ b/crates/rpc/rpc-eth-types/src/cache/mod.rs @@ -398,7 +398,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 @@ -427,7 +427,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 @@ -452,7 +452,7 @@ where // check if the header is cached if let Some(header) = this.headers_cache.get(&block_hash).cloned() { let _ = response_tx.send(Ok(header)); - continue; + continue } // header is not in the cache, request it if this is the first diff --git a/crates/rpc/rpc-eth-types/src/fee_history.rs b/crates/rpc/rpc-eth-types/src/fee_history.rs index 36f1e603141e..4d63482a670a 100644 --- a/crates/rpc/rpc-eth-types/src/fee_history.rs +++ b/crates/rpc/rpc-eth-types/src/fee_history.rs @@ -105,7 +105,7 @@ impl FeeHistoryCache { if entries.len() == 0 { self.inner.upper_bound.store(0, SeqCst); self.inner.lower_bound.store(0, SeqCst); - return; + return } let upper_bound = *entries.last_entry().expect("Contains at least one entry").key(); @@ -152,7 +152,7 @@ impl FeeHistoryCache { .collect::>(); if result.is_empty() { - return None; + return None } Some(result) @@ -245,7 +245,7 @@ pub async fn fee_history_cache_new_blocks_task( event = events.next() => { let Some(event) = event else { // the stream ended, we are done - break; + break }; let committed = event.committed(); @@ -314,7 +314,7 @@ where // Empty blocks should return in a zero row if transactions.is_empty() { rewards_in_block.push(0); - continue; + continue } let threshold = (gas_used as f64 * percentile / 100.) as u64; diff --git a/crates/rpc/rpc-eth-types/src/gas_oracle.rs b/crates/rpc/rpc-eth-types/src/gas_oracle.rs index e2e3fab8ccc1..ed49d7c67011 100644 --- a/crates/rpc/rpc-eth-types/src/gas_oracle.rs +++ b/crates/rpc/rpc-eth-types/src/gas_oracle.rs @@ -132,7 +132,7 @@ where // if we have stored a last price, then we check whether or not it was for the same head if inner.last_price.block_hash == header.hash() { - return Ok(inner.last_price.price); + return Ok(inner.last_price.price) } // if all responses are empty, then we can return a maximum of 2*check_block blocks' worth @@ -177,7 +177,7 @@ where // break when we have enough populated blocks if populated_blocks >= self.oracle_config.blocks { - break; + break } current_hash = parent_hash; @@ -247,14 +247,14 @@ where // ignore transactions with a tip under the configured threshold if let Some(ignore_under) = self.ignore_price { if effective_tip < Some(ignore_under) { - continue; + continue } } // check if the sender was the coinbase, if so, ignore if let Some(sender) = tx.recover_signer() { if sender == block.beneficiary() { - continue; + continue } } @@ -264,7 +264,7 @@ where // we have enough entries if prices.len() >= limit { - break; + break } } diff --git a/crates/rpc/rpc-eth-types/src/id_provider.rs b/crates/rpc/rpc-eth-types/src/id_provider.rs index 1c4efa7707c0..a2020d0b2199 100644 --- a/crates/rpc/rpc-eth-types/src/id_provider.rs +++ b/crates/rpc/rpc-eth-types/src/id_provider.rs @@ -29,7 +29,7 @@ fn to_quantity(val: u128) -> SubscriptionId<'static> { let non_zero = b.iter().take_while(|b| **b == 0).count(); let b = &b[non_zero..]; if b.is_empty() { - return SubscriptionId::Str("0x0".into()); + return SubscriptionId::Str("0x0".into()) } let mut id = String::with_capacity(2 * b.len() + 2); diff --git a/crates/rpc/rpc-eth-types/src/logs_utils.rs b/crates/rpc/rpc-eth-types/src/logs_utils.rs index eb40d274f2a2..8b2dbaa54412 100644 --- a/crates/rpc/rpc-eth-types/src/logs_utils.rs +++ b/crates/rpc/rpc-eth-types/src/logs_utils.rs @@ -152,7 +152,7 @@ pub fn log_matches_filter( !params.filter_address(&log.address) || !params.filter_topics(log.topics())) { - return false; + return false } true } diff --git a/crates/rpc/rpc-eth-types/src/revm_utils.rs b/crates/rpc/rpc-eth-types/src/revm_utils.rs index 87404a973d95..782ef5697960 100644 --- a/crates/rpc/rpc-eth-types/src/revm_utils.rs +++ b/crates/rpc/rpc-eth-types/src/revm_utils.rs @@ -118,13 +118,13 @@ impl CallFees { max_fee < block_base_fee { // `base_fee_per_gas` is greater than the `max_fee_per_gas` - return Err(RpcInvalidTransactionError::FeeCapTooLow.into()); + return Err(RpcInvalidTransactionError::FeeCapTooLow.into()) } if max_fee < max_priority_fee_per_gas { return Err( // `max_priority_fee_per_gas` is greater than the `max_fee_per_gas` RpcInvalidTransactionError::TipAboveFeeCap.into(), - ); + ) } // ref Ok(min( @@ -179,7 +179,7 @@ impl CallFees { // Ensure blob_hashes are present if !has_blob_hashes { // Blob transaction but no blob hashes - return Err(RpcInvalidTransactionError::BlobTransactionMissingBlobHashes.into()); + return Err(RpcInvalidTransactionError::BlobTransactionMissingBlobHashes.into()) } Ok(Self { diff --git a/crates/rpc/rpc-eth-types/src/utils.rs b/crates/rpc/rpc-eth-types/src/utils.rs index a05f68589aac..f12c819aea3f 100644 --- a/crates/rpc/rpc-eth-types/src/utils.rs +++ b/crates/rpc/rpc-eth-types/src/utils.rs @@ -13,7 +13,7 @@ use std::future::Future; /// See [`alloy_eips::eip2718::Decodable2718::decode_2718`] pub fn recover_raw_transaction(mut data: &[u8]) -> EthResult> { if data.is_empty() { - return Err(EthApiError::EmptyRawTransactionData); + return Err(EthApiError::EmptyRawTransactionData) } let transaction =