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

[Feature] Add Transaction::to_input function #1492

Closed
mattsse opened this issue Oct 16, 2024 · 2 comments
Closed

[Feature] Add Transaction::to_input function #1492

mattsse opened this issue Oct 16, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@mattsse
Copy link
Member

mattsse commented Oct 16, 2024

Component

consensus, eips, genesis

Describe the feature you would like

currently input returns a slice even though we know the tx types internally always use Bytes, which makes it expensive to obtain a Bytes instance.

we should add

fn to_input(&self) -> Bytes

for this, this way cloning the input is cheap

cc @tcoratger

Additional context

No response

@mattsse mattsse added the enhancement New feature or request label Oct 16, 2024
@DaniPopes
Copy link
Member

#1487 ?

@mattsse
Copy link
Member Author

mattsse commented Oct 16, 2024

makes sense although this wouldn't work for transactions (non-existing ones) that don't have input. but I guess we can make that assumption

@mattsse mattsse closed this as completed Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants