-
Notifications
You must be signed in to change notification settings - Fork 54
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: add fn body to process_slashings
#39
feat: add fn body to process_slashings
#39
Conversation
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.
nice work!
left some comments below
- Removed accessing state outside of `for` loop to inside - Allows `state`'s `validators` to be referenced as immutable as well as `balances` as mutable
Oops, didn't see the other comments....will update those too. |
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.
lgtm!
for i in 0..state.validators.len() { | ||
let validator = &state.validators[i]; | ||
if validator.slashed | ||
&& (epoch + context.epochs_per_slashings_vector as u64 / 2) |
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.
making a note to myself patch up the cast as part of #38.
No description provided.