Update 0_beacon-chain.md
This commit is contained in:
parent
ef0b3d2948
commit
b664453a34
|
@ -2435,8 +2435,9 @@ def process_voluntary_exit(state: BeaconState, exit: VoluntaryExit) -> None:
|
|||
assert validator.initiated_exit is False
|
||||
# Exits must specify an epoch when they become valid; they are not valid before then
|
||||
assert get_current_epoch(state) >= exit.epoch
|
||||
# Must have been in the validator set long enough
|
||||
assert validator.activation_epoch != FAR_FUTURE_EPOCH
|
||||
# Verify the validator is active
|
||||
assert is_active_validator(validator, state)
|
||||
# Verify the validator has been active long enough
|
||||
assert get_current_epoch(state) - validator.activation_epoch >= PERSISTENT_COMMITTEE_PERIOD
|
||||
# Verify signature
|
||||
assert bls_verify(
|
||||
|
@ -2445,7 +2446,7 @@ def process_voluntary_exit(state: BeaconState, exit: VoluntaryExit) -> None:
|
|||
signature=exit.signature,
|
||||
domain=get_domain(state.fork, exit.epoch, DOMAIN_VOLUNTARY_EXIT)
|
||||
)
|
||||
# Run the exit
|
||||
# Initiate exit
|
||||
initiate_validator_exit(state, exit.validator_index)
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue