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

fix small nits #153

Merged
merged 1 commit into from
Oct 31, 2023
Merged

fix small nits #153

merged 1 commit into from
Oct 31, 2023

Conversation

refcell
Copy link
Collaborator

@refcell refcell commented Oct 31, 2023

No description provided.

@refcell refcell requested a review from clabby October 31, 2023 21:56
@refcell refcell self-assigned this Oct 31, 2023
@@ -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();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we instead allocate this with capacity? This is called a lot, so this reallocation may hit perf.

Suggested change
let mut envelope_buf = Vec::new();
let mut envelope_buf = Vec::with_capacity(transaction.length_without_header());

@clabby clabby merged commit d082ae3 into clabby/op-reth Oct 31, 2023
10 of 21 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants