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.
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
R4R: Outstanding per-validator rewards; correctly handle same-BeginBlock redelegation-double-slash #3750
R4R: Outstanding per-validator rewards; correctly handle same-BeginBlock redelegation-double-slash #3750
Changes from 55 commits
da12165
b7d1d69
2f9a0da
c938039
066e11f
f7c3cc6
637902d
71774b8
d9b5071
0c0b142
aca59ac
002e49f
89e84f5
d25f793
c388d00
02b076f
1861c97
7972df8
8ff6302
4e15d33
f29bbae
72a850e
1c57f32
ed989af
4dd5f14
e8b83e2
f4e2c66
f312638
4b1a338
79809ee
e434724
9e1a4e4
bf9c168
db5c799
a9a72d1
bc26e22
713e7b6
38bb5e1
93f0556
ea06e12
7d02f1b
132b30f
280d9f4
0bc856e
77959f5
094ae45
66f44f9
ead8a2f
1d47060
9360b08
96bf7e9
37311ca
4c1fd17
86763f8
56b2b04
afdac45
31cd44d
1217373
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of doing this, since multiplication/division is expensive, i think we can do:
((d.Int + (precisionReuse-1)) * precisionReuse) / d2.Int
then we wouldn't need chopPrecisionAndRoundUp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's do that, but in a separate PR - #3812
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use
NewValidatorOutstandingRewardsRecord
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that isn't a function? these are just internal structs for genesis import/export
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I meant create then use
NewValidatorOutstandingRewardsRecord
- it's just good practice to use New constructors incase the fields changeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree here ^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly I don't, if we want to do this consistently we'd need to add
NewXYZ
functions for all of the genesis structs (none have them at the moment), it seems like quite a bit of misdirecting boilerplate.