[go: up one dir, main page]

Etherlink/Kernel/Stage 2: remove useless mutations

Checklist

  • Provide automatic testing.
  • Add an item in the changelog

What

In the block::produce function, there are four mutable variables (current_block_number, current_block_parent_hash, previous_receipts_root, and previous_transactions_root) which are updated after the successful application of a block (as part of compute_bip).

Before !16274 (merged), when applying several blocks in the same call to block::produce, this was useful to avoid rereading the previous block but now these mutations have become useless (the variables are not read after these mutations).

This MR removes the 4 lines mutating these variables at the end of compute_bip and fixes the clippy warnings produced by this removal.

Why

To simplify the code of stage 2.

How

Manually testing the MR

Merge request reports

Loading