Skip to content

Conversation

Pronoss
Copy link
Contributor

@Pronoss Pronoss commented Apr 11, 2025

Fixes #XXX

Changes

  • Removed mutation of the original Transaction object during gas estimation
  • Introduced safe cloning via Transaction.CopyTo() to solve TODO in GasEstimator.TryExecutableTransaction

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature
  • Breaking change
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: n/a

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

Existing coverage is sufficient. This change preserves logic and only affects internal transaction handling during estimation.

Documentation

Requires documentation update

  • Yes
  • No

Requires explanation in Release Notes

  • Yes
  • No

Remarks

This PR resolves the inline // TODO: Workaround to not mutate the original Tx by introducing a proper, non-mutating transaction cloning process using Transaction.CopyTo(). This improves safety and code clarity in gas estimation routines.

@LukaszRozmej LukaszRozmej merged commit 18f2630 into NethermindEth:master Apr 22, 2025
80 checks passed
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