mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-14 20:54:27 +00:00
Avoid underflow in voluntary exits
This commit is contained in:
parent
91a0c1ba5f
commit
78f47f2069
@ -2472,6 +2472,7 @@ def process_voluntary_exit(state: BeaconState, exit: VoluntaryExit) -> None:
|
|||||||
# Exits must specify an epoch when they become valid; they are not valid before then
|
# Exits must specify an epoch when they become valid; they are not valid before then
|
||||||
assert get_current_epoch(state) >= exit.epoch
|
assert get_current_epoch(state) >= exit.epoch
|
||||||
# Must have been in the validator set long enough
|
# Must have been in the validator set long enough
|
||||||
|
assert validator.activation_epoch != FAR_FUTURE_EPOCH
|
||||||
assert get_current_epoch(state) - validator.activation_epoch >= PERSISTENT_COMMITTEE_PERIOD
|
assert get_current_epoch(state) - validator.activation_epoch >= PERSISTENT_COMMITTEE_PERIOD
|
||||||
# Verify signature
|
# Verify signature
|
||||||
assert bls_verify(
|
assert bls_verify(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user