Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Weaken criterion for attestation inclusion #420

Merged
merged 1 commit into from
Mar 19, 2019

Conversation

hwwhww
Copy link
Contributor

@hwwhww hwwhww commented Mar 17, 2019

What was wrong?

Fix #411

How was it fixed?

Change

    assert state.slot < attestation.data.slot + SLOTS_PER_EPOCH

to

    assert state.slot <= attestation.data.slot + SLOTS_PER_EPOCH

Cute Animal Picture

moose-602659_640

@hwwhww hwwhww added the eth2.0 label Mar 17, 2019
@hwwhww hwwhww requested a review from NIC619 March 17, 2019 02:56
Copy link
Contributor

@NIC619 NIC619 left a comment

Choose a reason for hiding this comment

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

Looks good!

raise ValidationError(
"Attestation slot plus `SLOTS_PER_EPOCH` is too low; "
"must exceed the current state:\n"
"Attestation slot plus `SLOTS_PER_EPOCH` is too low\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be made an f-string and the \t in the beginning of the next line removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's okay, \n (escape) is fine in the normal string.
\t is a readability improvement here.

@hwwhww hwwhww merged commit b682e75 into ethereum:master Mar 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Weaken criterion for attestation inclusion
2 participants