Skip to content

Conversation

@Snezhkko
Copy link
Contributor

This change removes two unnecessary Arc clones of the parent header in PayloadBuilderStack::build_empty_payload by destructuring the owned PayloadConfig and moving parent_header directly into the branch-specific PayloadConfig. Since PayloadConfig::parent_header is an Arc<SealedHeader<...>> and the function takes config by value, cloning the Arc only increments and later decrements the refcount without any semantic benefit. The refactoring preserves behavior and type safety, as the impl requires both sides to share the same Primitives, ensuring the header type matches between branches. The result is slightly reduced refcount churn with no API changes or logic alterations.

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.

i allow it

@github-project-automation github-project-automation bot moved this from Backlog to In Progress in Reth Tracker Nov 26, 2025
@mattsse mattsse added this pull request to the merge queue Nov 26, 2025
@mattsse mattsse added the C-debt A clean up/refactor of existing code label Nov 26, 2025
Merged via the queue into paradigmxyz:main with commit f386f96 Nov 26, 2025
44 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Reth Tracker Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-debt A clean up/refactor of existing code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants