Skip to content

Conversation

@ARR4N
Copy link
Collaborator

@ARR4N ARR4N commented Sep 30, 2024

Why this should be merged

params.ChainConfig (and Rules) are often copied by dereferencing a pointer, which results in a shallow copy of extra payloads. There was previously no way to update a payload on the copy without changing the original—this PR addresses that shortcoming.

How this works

The methods are updated to set the payload to a fresh pseudo.From[C/R](val).Type.

How this was tested

Existing unit tests are updated to demonstrate both shallow copying and the decoupling achieved by SetOn<T>() methods.

@ARR4N ARR4N enabled auto-merge (squash) September 30, 2024 17:19
@ARR4N ARR4N requested review from a team, ceyonur, darioush and michaelkaplan13 and removed request for a team September 30, 2024 17:19
@ARR4N ARR4N merged commit 1478c18 into libevm Sep 30, 2024
3 checks passed
@ARR4N ARR4N deleted the arr4n/extrapayloads-set-on-fix branch September 30, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants