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

Fork choice: Remove redundant check in validate_on_attestation #1755

Merged
merged 2 commits into from
Apr 30, 2020

Conversation

paulhauner
Copy link
Contributor

Removes a redundant check from fork choice validate_on_attestation.

assert target.epoch in [current_epoch, previous_epoch] already asserts this.

I've raised this for a few reasons:

  • To ensure I'm not missing something.
  • If it's impossible to hit then it's impossible to test and I think we should remove it.
  • The "... delay consideration ..." note becomes ineffective if we can never reach it.

@djrtwo
Copy link
Contributor

djrtwo commented Apr 27, 2020

You are correct, but I might argue for still having the a comment above assert target.epoch in [current_epoch, previous_epoch] that says # If attestation target is from a future epoch, delay consideration until the epoch arrives

@adiasg adiasg added the phase0 label Apr 28, 2020
@paulhauner
Copy link
Contributor Author

You are correct, but I might argue for still having the a comment above assert target.epoch in [current_epoch, previous_epoch] that says # If attestation target is from a future epoch, delay consideration until the epoch arrives

Done :)

Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

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

Thanks!

Will release in v0.11.3 or v0.12 whichever comes next

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants