[go: up one dir, main page]

Tezlink/Kernel/Transfer: remove nested results in application functions

Stacked on !18614 (merged).

What

Before this MR, the functions used in the lib.rs file of the tezos_execution crate to apply operations use two levels of Result: one for expected errors which make the operation fail with a failure receipt and the ApplyKernelErrors which lead to reverting the block.

This MR simplifies application logic by using only the former; after the MR, in case of unexpected errors during application we only revert the state to the end of validation (+ incrementing the counter and debiting the fees).

Why

Nested results are not convenient and I don't think that reverting the payment of fees is a good idea.

How

Manually testing the MR

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR

Merge request reports

Loading