Merge pull request #1140 from 0xKiwi/patch-1

Remove mentions of current_shuffling_epoch
This commit is contained in:
Danny Ryan 2019-06-04 11:10:49 -06:00 committed by GitHub
commit 748165cc03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -115,12 +115,11 @@ Once a validator has been processed and added to the beacon state's `validator_r
In normal operation, the validator is quickly activated at which point the validator is added to the shuffling and begins validation after an additional `ACTIVATION_EXIT_DELAY` epochs (25.6 minutes).
The function [`is_active_validator`](../core/0_beacon-chain.md#is_active_validator) can be used to check if a validator is active during a given shuffling epoch. Note that the `BeaconState` contains a field `current_shuffling_epoch` which dictates from which epoch the current active validators are taken. Usage is as follows:
The function [`is_active_validator`](../core/0_beacon-chain.md#is_active_validator) can be used to check if a validator is active during a given epoch. Usage is as follows:
```python
shuffling_epoch = state.current_shuffling_epoch
validator = state.validator_registry[validator_index]
is_active = is_active_validator(validator, shuffling_epoch)
is_active = is_active_validator(validator, get_current_epoch(state))
```
Once a validator is activated, the validator is assigned [responsibilities](#beacon-chain-responsibilities) until exited.