Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Make use of Perbill in staking/phragmen for readibility #2908

Closed
gui1117 opened this issue Jun 19, 2019 · 0 comments · Fixed by #3456
Closed

Make use of Perbill in staking/phragmen for readibility #2908

gui1117 opened this issue Jun 19, 2019 · 0 comments · Fixed by #3456
Assignees
Labels
I7-refactor Code needs refactoring.
Milestone

Comments

@gui1117
Copy link
Contributor

gui1117 commented Jun 19, 2019

We still want to keep PerU128 as it is, but we can get read of ACCURACY by replacing operation using ACCURACY by a Perbill implementation.

Note that using Perbill implementation is less precise than the current const. If we really want that precision we can create a PerU32 in the same way of Perbill, or even a PerU64 is actually implementable (because we need double space and u128 is available).

This would improve readibility of the code.

follows #2889,

see this comment #2889 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I7-refactor Code needs refactoring.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants