stellar-core icon indicating copy to clipboard operation
stellar-core copied to clipboard

TransactionFrame Refactor

Open SirTyson opened this issue 1 year ago • 0 comments

Description

Resolves https://github.com/stellar/stellar-core/issues/2163

This PR makes all TransactionFrame variants immutable. All mutable state, such as TransactionResult and caches has been moved to the TransactionResultPayload class. Hash caches are still in TransactionFrame, but only because the contents they hash are immutable such that the cache can never be invalidated.

To maintain our current testing framework, TransactionTestFrame acts as a wrapper class, combining an immutable TransactionFrame with it's associated TransactionResultPayload object for easier testing.

Checklist

  • [x] Reviewed the contributing document
  • [x] Rebased on top of master (no merge commits)
  • [x] Ran clang-format v8.0.0 (via make format or the Visual Studio extension)
  • [x] Compiles
  • [x] Ran all tests
  • [ ] If change impacts performance, include supporting evidence per the performance document

SirTyson avatar May 07 '24 23:05 SirTyson