stellar-core
stellar-core copied to clipboard
TransactionFrame Refactor
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-formatv8.0.0 (viamake formator the Visual Studio extension) - [x] Compiles
- [x] Ran all tests
- [ ] If change impacts performance, include supporting evidence per the performance document