Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Commit

Permalink
fix small nits
Browse files Browse the repository at this point in the history
  • Loading branch information
refcell committed Oct 31, 2023
1 parent da3a9c5 commit 07b23f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/primitives/src/revm/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ pub fn tx_env_with_recovered(transaction: &TransactionSignedEcRecovered) -> TxEn

#[cfg(feature = "optimism")]
{
let mut envelope_buf = Vec::default();
let mut envelope_buf = Vec::new();
transaction.encode_enveloped(&mut envelope_buf);
fill_tx_env(&mut tx_env, transaction.as_ref(), transaction.signer(), envelope_buf.into());
}
Expand Down
6 changes: 3 additions & 3 deletions crates/rpc/rpc-engine-api/src/engine_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,12 @@ where
self.inner.task_spawner.spawn_blocking(Box::pin(async move {
if count > MAX_PAYLOAD_BODIES_LIMIT {
tx.send(Err(EngineApiError::PayloadRequestTooLarge { len: count })).ok();
return;
return
}

if start == 0 || count == 0 {
tx.send(Err(EngineApiError::InvalidBodiesRange { start, count })).ok();
return;
return
}

let mut result = Vec::with_capacity(count as usize);
Expand All @@ -291,7 +291,7 @@ where
}
Err(err) => {
tx.send(Err(EngineApiError::Internal(Box::new(err)))).ok();
return;
return
}
};
}
Expand Down

0 comments on commit 07b23f6

Please sign in to comment.