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

Inline convert_to_payload_body_v1 in engine api #14149

Closed
mattsse opened this issue Feb 1, 2025 · 3 comments
Closed

Inline convert_to_payload_body_v1 in engine api #14149

mattsse opened this issue Feb 1, 2025 · 3 comments
Assignees
Labels
A-rpc Related to the RPC implementation C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started

Comments

@mattsse
Copy link
Collaborator

mattsse commented Feb 1, 2025

Describe the feature

we can now get rid of this entirely:

pub fn convert_to_payload_body_v1(
value: impl reth_primitives_traits::Block,
) -> ExecutionPayloadBodyV1 {
let transactions = value.body().transactions_iter().map(|tx| tx.encoded_2718().into());
ExecutionPayloadBodyV1 {
transactions: transactions.collect(),
withdrawals: value.body().withdrawals().cloned().map(Withdrawals::into_inner),
}
}

if we inline the function body where we use the fn:

self.get_payload_bodies_by_range_with(start, count, convert_to_payload_body_v1).await

and

self.get_payload_bodies_by_hash_with(hashes, convert_to_payload_body_v1).await

TODO

  • inline fn as closure
  • rm function

FYI @temaniarpit27

Additional context

No response

@mattsse mattsse added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels Feb 1, 2025
@VeerChaurasia
Copy link
Contributor

hey @mattsse can i work on this one?

@temaniarpit27
Copy link
Contributor

can @mattsse can i pick this up?

@mattsse mattsse added D-good-first-issue Nice and easy! A great choice to get started A-rpc Related to the RPC implementation and removed S-needs-triage This issue needs to be labelled labels Feb 3, 2025
@temaniarpit27
Copy link
Contributor

@mattsse can we close this issue as completed? Let me know if there is anything else here.
Thanks

@mattsse mattsse closed this as completed Feb 4, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Reth Tracker Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started
Projects
Archived in project
Development

No branches or pull requests

3 participants