Skip to content

Refactor some functions to return by value #3236

@rodrigo-pino

Description

@rodrigo-pino

Each of this tasks should be solved in an independent PR

  1. Refactor GetReverseStateDiff function in `blockchain.go to return by value. Spread the change to every piece of code that interacts with this function.
  2. Refactor AdaptOrderedMessageToL1 (in vm2core.go) to receive by reference and return by value

Then in sn2core.go:

  1. RefactorAdaptBlock to return by value.
  2. Refactor AdaptTransactionReceipt to return by value
  3. The same for adaptGasConsumed
  4. The same for AdaptEvent
  5. AdaptExecutionResources
  6. AdaptL1ToL2Message
  7. AdaptL2ToL1Message
  8. AdaptStateUpdate
  9. AdaptStateDiff
  10. Refactor AdaptCompiledClass by renaming it AdaptCasmClass and return by value (core.Casm instead of *core.Casm)
  11. Refactor AdaptSierraClass to return by value

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions