Skip to content

Commit

Permalink
touchups
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Dec 24, 2024
1 parent 7894c0d commit d74f335
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions crates/rpc/rpc-eth-types/src/cache/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions crates/rpc/rpc-eth-types/src/fee_history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -152,7 +152,7 @@ impl FeeHistoryCache {
.collect::<Vec<_>>();

if result.is_empty() {
return None;
return None
}

Some(result)
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions crates/rpc/rpc-eth-types/src/gas_oracle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/rpc/rpc-eth-types/src/revm_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion crates/rpc/rpc-eth-types/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::future::Future;
/// See [`alloy_eips::eip2718::Decodable2718::decode_2718`]
pub fn recover_raw_transaction<T: SignedTransaction>(mut data: &[u8]) -> EthResult<RecoveredTx<T>> {
if data.is_empty() {
return Err(EthApiError::EmptyRawTransactionData);
return Err(EthApiError::EmptyRawTransactionData)
}

let transaction =
Expand Down

0 comments on commit d74f335

Please sign in to comment.