mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-20 06:18:15 +00:00
minor fix
This commit is contained in:
parent
12a1bd2473
commit
f1da3c55cd
@ -321,7 +321,6 @@ def shuffle(values: List[Any],
|
|||||||
seed: Hash32) -> List[Any]:
|
seed: Hash32) -> List[Any]:
|
||||||
"""
|
"""
|
||||||
Returns the shuffled ``values`` with seed as entropy.
|
Returns the shuffled ``values`` with seed as entropy.
|
||||||
Mainly for shuffling active validators in-protocol.
|
|
||||||
"""
|
"""
|
||||||
values_count = len(values)
|
values_count = len(values)
|
||||||
|
|
||||||
@ -437,7 +436,7 @@ def get_shards_and_committees_for_slot(crystallized_state: CrystallizedState,
|
|||||||
|
|
||||||
def get_block_hash(active_state:ActiveState,
|
def get_block_hash(active_state:ActiveState,
|
||||||
current_block: BeaconBlock,
|
current_block: BeaconBlock,
|
||||||
slot: int):
|
slot: int) -> Hash32:
|
||||||
earliest_slot_in_array = current_block.slot - CYCLE_LENGTH * 2
|
earliest_slot_in_array = current_block.slot - CYCLE_LENGTH * 2
|
||||||
assert earliest_slot_in_array <= slot < earliest_slot_in_array + CYCLE_LENGTH * 2
|
assert earliest_slot_in_array <= slot < earliest_slot_in_array + CYCLE_LENGTH * 2
|
||||||
return active_state.recent_block_hashes[slot - earliest_slot_in_array]
|
return active_state.recent_block_hashes[slot - earliest_slot_in_array]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user