Skip to content
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

Merged
merged 4 commits into from
Jan 4, 2022

Conversation

dtbuchholz
Copy link
Contributor

No description provided.

@dtbuchholz dtbuchholz mentioned this pull request Dec 29, 2021
21 tasks
Copy link
Owner

@ralexstokes ralexstokes left a 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

src/phase0/state_transition/epoch_processing.rs Outdated Show resolved Hide resolved
src/phase0/state_transition/epoch_processing.rs Outdated Show resolved Hide resolved
- Removed accessing state outside of `for` loop to inside
- Allows `state`'s `validators` to be referenced as immutable as well as `balances` as mutable
@dtbuchholz
Copy link
Contributor Author

Oops, didn't see the other comments....will update those too.

Copy link
Owner

@ralexstokes ralexstokes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@ralexstokes ralexstokes merged commit 640e8ba into ralexstokes:main Jan 4, 2022
for i in 0..state.validators.len() {
let validator = &state.validators[i];
if validator.slashed
&& (epoch + context.epochs_per_slashings_vector as u64 / 2)
Copy link
Owner

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.

@dtbuchholz dtbuchholz deleted the issue-29-process-slashings branch January 4, 2022 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants