-
Notifications
You must be signed in to change notification settings - Fork 995
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
Validator status improvements and fix #5775
Conversation
for _, ctnr := range dc.deposits { | ||
// Search the list backwards since this function is only used for | ||
// pending activation validators and the newest deposits are always at the end. | ||
for i := len(dc.deposits) - 1; i > 0; i-- { |
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.
If anyone disagrees with this change please let me know, this function is only used for newer validators so I figured it'd make sense.
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.
This makes sense, nice catch!
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.
Please change this back, this picks the wrong deposit in the event of top-ups. Its why the tests fail now.
for _, ctnr := range dc.deposits { | ||
// Search the list backwards since this function is only used for | ||
// pending activation validators and the newest deposits are always at the end. | ||
for i := len(dc.deposits) - 1; i > 0; i-- { |
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.
This makes sense, nice catch!
@rauljordan it seems like the deposit change breaks a test |
for _, ctnr := range dc.deposits { | ||
// Search the list backwards since this function is only used for | ||
// pending activation validators and the newest deposits are always at the end. | ||
for i := len(dc.deposits) - 1; i > 0; i-- { |
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.
Please change this back, this picks the wrong deposit in the event of top-ups. Its why the tests fail now.
…into val-status-optimize
Codecov Report
@@ Coverage Diff @@
## master #5775 +/- ##
=======================================
Coverage 57.80% 57.80%
=======================================
Files 312 312
Lines 26437 26437
=======================================
Hits 15282 15282
Misses 9040 9040
Partials 2115 2115 |
What type of PR is this?
Improvement
What does this PR do? Why is it needed?
This PR changes all references of
ValidatorAtIndex
toValidatorAtIndexReadOnly
since there are no modifications made to validators throughout this function.Also fixes a reporting issue made in #5396
Which issues(s) does this PR fix?
Fixes #5720