This commit is contained in:
Hsiao-Wei Wang 2019-02-28 16:30:46 +08:00
parent b2c53045fc
commit 34091d70ec
No known key found for this signature in database
GPG Key ID: 95B070122902DEA4
2 changed files with 4 additions and 3 deletions

View File

@ -55,6 +55,7 @@
- [Helper functions](#helper-functions)
- [`hash`](#hash)
- [`hash_tree_root`](#hash_tree_root)
- [`signed_root`](#signed_root)
- [`slot_to_epoch`](#slot_to_epoch)
- [`get_previous_epoch`](#get_previous_epoch)
- [`get_current_epoch`](#get_current_epoch)
@ -968,7 +969,7 @@ def generate_seed(state: BeaconState,
```python
def get_beacon_proposer_index(state: BeaconState,
slot: Slot,
registry_change: bool=False)) -> ValidatorIndex:
registry_change: bool=False) -> ValidatorIndex:
"""
Return the beacon proposer index for the ``slot``.
"""

View File

@ -50,7 +50,7 @@ __NOTICE__: This document is a work-in-progress for researchers and implementers
- [Aggregation bitfield](#aggregation-bitfield)
- [Custody bitfield](#custody-bitfield)
- [Aggregate signature](#aggregate-signature)
- [Validator assigments](#validator-assignments)
- [Validator assignments](#validator-assignments)
- [Lookahead](#lookahead)
- [How to avoid slashing](#how-to-avoid-slashing)
- [Proposer slashing](#proposer-slashing)
@ -371,7 +371,7 @@ def get_committee_assignment(
if len(selected_committees) > 0:
validators = selected_committees[0][0]
shard = selected_committees[0][1]
is_proposer = validator_index == get_beacon_proposer_index(state, slot, registry_change)
is_proposer = validator_index == get_beacon_proposer_index(state, slot, registry_change=registry_change)
assignment = (validators, shard, slot, is_proposer)
return assignment