Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

N-06 Magic Numbers #610

Merged
merged 3 commits into from
Oct 18, 2024
Merged

N-06 Magic Numbers #610

merged 3 commits into from
Oct 18, 2024

Conversation

geoff-vball
Copy link
Contributor

@geoff-vball geoff-vball commented Oct 18, 2024

Why this should be merged

Removes magic numbers

I think changing 100 to a constant when dealing with percentages is more confusing than using the number, but let me know if anyone has a differing opinion here.

@geoff-vball geoff-vball requested a review from a team as a code owner October 18, 2024 13:13
@geoff-vball geoff-vball changed the base branch from main to validator-manager October 18, 2024 13:14
Copy link
Contributor

@iansuvak iansuvak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that 100 is cleaner than replacing it with a constant for percentage uptime.

The other magic number I saw as 1e12 but that's going to be addressed in M-01

Copy link
Contributor

@cam-schultz cam-schultz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I was thinking of ways to eliminate the duplicate constant, but couldn't come up with anything that didn't muddy the rewards calculator interface. Since delegator fees are handled exclusively by the PoSValidatorManager, there's reason to have the const in both places anyway.

@geoff-vball geoff-vball merged commit 8162aea into validator-manager Oct 18, 2024
14 checks passed
@michaelkaplan13 michaelkaplan13 deleted the n06-magic-numbers branch October 22, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants