Scoru,Proto: make [stakers] both a record and private
Context
Having a pair is not ideal because:
- We use the
Index.normalizea lot to ensure that(a = alice, b = bob) - The pattern below is very common in the code because of this pair.
let (a, b) = Index.normalize in
let _ = foo (a, b) in
let _ = bar (a, b)
So I propose here to change the pair to a private record, that is, alice is always the correct Staker.t thanks to make. The pair is never reconstructed, we only read from once it's created so (2) is fixed as well.
Manually testing the MR
Checklist
- n/a Document the interface of any function added or modified (see the coding guidelines)
- n/a Document any change to the user interface, including configuration parameters (see node configuration)
-
Provide automatic testing (see the testing guide). - n/a For new features and bug fixes, add an item in the appropriate changelog (
docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Valentin Chaboche