[go: up one dir, main page]

Proto: minor refactoring for double (pre)attesting application

What

Minor refactoring in apply.ml

Why

Just like !16167 (merged), this change was originally part of !15244 (merged) as the addition of a new consensus operation (Attestations_aggregate) added nondesirable case in some pattern matchings. To facilitate the review process, this part has been split into this separate MR.

In the previous implementation, the function punish_double_attestation_or_preattestation took a 'kind Kind.consensus operation as a parameter that is not relevant for attestations_aggregate. The function was was also kind of hard to read and follow.

How

punish_double_attestation_or_preattestation is now splitted into punish_double_attestation and punish_double_preattestation.

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
Edited by Adam

Merge request reports

Loading