Skip to content

Commit

Permalink
make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkenan committed Oct 31, 2024
1 parent 9ef8110 commit 2dba084
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion crates/networking/rpc/authentication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct Claims {

/// Authenticates bearer jwt to check that authrpc calls are sent by the consensus layer
pub fn validate_jwt_authentication(token: &str, secret: &Bytes) -> Result<(), AuthenticationError> {
let decoding_key = DecodingKey::from_secret(&secret);
let decoding_key = DecodingKey::from_secret(secret);
let mut validation = Validation::new(Algorithm::HS256);
validation.validate_exp = false;
validation.set_required_spec_claims(&["iat"]);
Expand Down
2 changes: 1 addition & 1 deletion crates/networking/rpc/engine/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl RpcHandler for NewPayloadV3Request {

// Execute and store the block
info!("Executing payload with block hash: {block_hash:#x}");
let payload_status = match add_block(&block, &storage) {
let payload_status = match add_block(&block, storage) {
Err(ChainError::ParentNotFound) => Ok(PayloadStatus::syncing()),
// Under the current implementation this is not possible: we always calculate the state
// transition of any new payload as long as the parent is present. If we received the
Expand Down
2 changes: 1 addition & 1 deletion crates/networking/rpc/eth/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ impl RpcHandler for GetProofRequest {
"Requested proof for account {} at block {} with storage keys: {:?}",
self.address, self.block, self.storage_keys
);
let Some(block_number) = self.block.resolve_block_number(&storage)? else {
let Some(block_number) = self.block.resolve_block_number(storage)? else {
return Ok(Value::Null);
};
// Create account proof
Expand Down
2 changes: 1 addition & 1 deletion crates/networking/rpc/eth/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl RpcHandler for GetBlockByNumberRequest {
fn handle(&self, context: RpcApiContext) -> Result<Value, RpcErr> {
let storage = &context.storage;
info!("Requested block with number: {}", self.block);
let block_number = match self.block.resolve_block_number(&storage)? {
let block_number = match self.block.resolve_block_number(storage)? {
Some(block_number) => block_number,
_ => return Ok(Value::Null),
};
Expand Down
2 changes: 1 addition & 1 deletion crates/networking/rpc/eth/fee_market.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl RpcHandler for FeeHistoryRequest {
}

let (start_block, end_block) =
Self::get_range(&storage, self.block_count, &self.newest_block)?;
Self::get_range(storage, self.block_count, &self.newest_block)?;
let oldest_block = start_block;
let block_count = (end_block - start_block) as usize;
let mut base_fee_per_gas = Vec::<u64>::with_capacity(block_count + 1);
Expand Down
4 changes: 2 additions & 2 deletions crates/networking/rpc/eth/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ impl RpcHandler for GetTransactionReceiptRequest {
None => return Ok(Value::Null),
};
let receipts =
block::get_all_block_rpc_receipts(block_number, block.header, block.body, &storage)?;
block::get_all_block_rpc_receipts(block_number, block.header, block.body, storage)?;
serde_json::to_value(receipts.get(index as usize))
.map_err(|error| RpcErr::Internal(error.to_string()))
}
Expand Down Expand Up @@ -469,7 +469,7 @@ impl RpcHandler for EstimateGasRequest {
highest_gas_limit = recap_with_account_balances(
highest_gas_limit,
&self.transaction,
&storage,
storage,
block_header.number,
)?;
}
Expand Down

0 comments on commit 2dba084

Please sign in to comment.