This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Convert tuples to structs in Stake rewards-calculation functions#24681
Merged
mergify[bot] merged 2 commits intosolana-labs:masterfrom Apr 27, 2022
Merged
Convert tuples to structs in Stake rewards-calculation functions#24681mergify[bot] merged 2 commits intosolana-labs:masterfrom
mergify[bot] merged 2 commits intosolana-labs:masterfrom
Conversation
ryoqun
reviewed
Apr 26, 2022
ryoqun
reviewed
Apr 26, 2022
ryoqun
reviewed
Apr 26, 2022
ryoqun
reviewed
Apr 26, 2022
ryoqun
reviewed
Apr 26, 2022
ryoqun
previously approved these changes
Apr 26, 2022
Contributor
ryoqun
left a comment
There was a problem hiding this comment.
lgtm with nits. really appreciate spending time for this cleanup for benefits of all future readers.
Contributor
Author
|
Thanks for all the good ideas, @ryoqun ! |
Codecov Report
@@ Coverage Diff @@
## master #24681 +/- ##
=========================================
+ Coverage 81.8% 82.0% +0.2%
=========================================
Files 632 596 -36
Lines 167499 165357 -2142
Branches 322 0 -322
=========================================
- Hits 137169 135748 -1421
+ Misses 30217 29609 -608
+ Partials 113 0 -113 |
4eb2389 to
5a535fb
Compare
t-nelson
previously approved these changes
Apr 26, 2022
Contributor
t-nelson
left a comment
There was a problem hiding this comment.
aw. when did we draw straws? 🙂
lgtm! thanks for being the one to finally bite the bullet!
5a535fb to
ecf9603
Compare
jeffwashington
pushed a commit
to jeffwashington/solana
that referenced
this pull request
Apr 27, 2022
…ana-labs#24681) * Replace opaque tuples with structs in Stake rewards calculation * Fixup struct and field names, and remove one cumbersome destructuring
jeffwashington
pushed a commit
to jeffwashington/solana
that referenced
this pull request
Jun 29, 2022
…ana-labs#24681) * Replace opaque tuples with structs in Stake rewards calculation * Fixup struct and field names, and remove one cumbersome destructuring
jeffwashington
pushed a commit
to jeffwashington/solana
that referenced
this pull request
Jun 29, 2022
…ana-labs#24681) * Replace opaque tuples with structs in Stake rewards calculation * Fixup struct and field names, and remove one cumbersome destructuring
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
It's difficult to remember what the return values from the Stake program's internal rewards-calculation functions signify. This one is especially awful:
Summary of Changes
Replace opaque tuples with helper structs
No behavior changes
Open to bikeshedding on struct field names.