-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat - validator redirects #5
base: main
Are you sure you want to change the base?
Conversation
cmd/ssv-rewards/calc.go
Outdated
ownerRedirectsSupport := len(mechanics.OwnerRedirects) > 0 | ||
validatorRedirectsSupport := len(mechanics.ValidatorRedirects) > 0 |
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.
we're not populating the tables here like in recipientParticipations
, so it seems that if you call this func before, the redirections will be missing
i wouldn't mind just copying the code from below over here, or maybe creating a function for prepareRedirections that returns both if they're enabled (bool, bool) and populates them ifn eeded
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.
@olegshmuelov Moshe is out how can i recreate this? Do a validator redirect with no owner redirects?
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.
we're not populating the tables here like in
recipientParticipations
, so it seems that if you call this func before, the redirections will be missingi wouldn't mind just copying the code from below over here, or maybe creating a function for prepareRedirections that returns both if they're enabled (bool, bool) and populates them ifn eeded
Good catch! I extracted the logic preparing the redirections into a new function called prepareRedirections
.
This way, both validatorParticipations
and recipientParticipations
will have the same logic to fill in the redirection tables and thus cannot miss any redirections.
see e9192f0
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.
Code and SQL looks really good & readable 👍
Left a few minor comments
No description provided.