PR feedback
This commit is contained in:
parent
76c96782e2
commit
8b39d41145
|
@ -47,7 +47,7 @@
|
|||
- [`compute_updated_gasprice`](#compute_updated_gasprice)
|
||||
- [`compute_committee_source_epoch`](#compute_committee_source_epoch)
|
||||
- [Beacon state accessors](#beacon-state-accessors)
|
||||
- [New `get_committee_count_per_slot`](#new-get_committee_count_per_slot)
|
||||
- [Updated `get_committee_count_per_slot`](#updated-get_committee_count_per_slot)
|
||||
- [`get_active_shard_count`](#get_active_shard_count)
|
||||
- [`get_online_validator_indices`](#get_online_validator_indices)
|
||||
- [`get_shard_committee`](#get_shard_committee)
|
||||
|
@ -522,7 +522,7 @@ def compute_committee_source_epoch(epoch: Epoch, period: uint64) -> Epoch:
|
|||
|
||||
### Beacon state accessors
|
||||
|
||||
#### New `get_committee_count_per_slot`
|
||||
#### Updated `get_committee_count_per_slot`
|
||||
|
||||
```python
|
||||
def get_committee_count_per_slot(state: BeaconState, epoch: Epoch) -> uint64:
|
||||
|
@ -539,6 +539,10 @@ def get_committee_count_per_slot(state: BeaconState, epoch: Epoch) -> uint64:
|
|||
|
||||
```python
|
||||
def get_active_shard_count(state: BeaconState) -> uint64:
|
||||
"""
|
||||
Return the number of active shards.
|
||||
Note that this puts an upper bound on the number of committees per slot.
|
||||
"""
|
||||
return INITIAL_ACTIVE_SHARDS
|
||||
```
|
||||
|
||||
|
|
|
@ -76,6 +76,9 @@ def test_empty_block_transition(spec, state):
|
|||
|
||||
yield 'pre', state
|
||||
|
||||
# Ensure pre-state has default randao
|
||||
assert spec.get_randao_mix(state, spec.get_current_epoch(state)) == spec.Bytes32()
|
||||
|
||||
block = build_empty_block_for_next_slot(spec, state)
|
||||
|
||||
signed_block = state_transition_and_sign_block(spec, state, block)
|
||||
|
@ -98,6 +101,9 @@ def test_empty_block_transition_large_validator_set(spec, state):
|
|||
|
||||
yield 'pre', state
|
||||
|
||||
# Ensure pre-state has default randao
|
||||
assert spec.get_randao_mix(state, spec.get_current_epoch(state)) == spec.Bytes32()
|
||||
|
||||
block = build_empty_block_for_next_slot(spec, state)
|
||||
|
||||
signed_block = state_transition_and_sign_block(spec, state, block)
|
||||
|
|
Loading…
Reference in New Issue