Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Impl TryFrom<Recovered<TxEnvelope for MockTransaction #15005

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stevencartavia
Copy link
Contributor

closes #15001

@stevencartavia stevencartavia requested a review from mattsse as a code owner March 13, 2025 06:01
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

smol nits

#[allow(unreachable_patterns)]
match transaction {
EthereumTxEnvelope::Legacy(signed_tx) => {
let tx = signed_tx.tx();
Copy link
Collaborator

Choose a reason for hiding this comment

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

you can use .strip_signature here and then get rid of the additional clones,

I think we should introduce fn into_tx in addition to strip_signature because this is more intuitive, mind submitting this to alloy as well?

let hash = *transaction.tx_hash();
let size = transaction.size();

#[allow(unreachable_patterns)]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we need this here or on the TransactionSigned match, i believe this is a leftover from optimism features

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Impl TryFrom<Recovered<TxEnvelope for MockTransaction
2 participants