mirror of
https://github.com/ethereum/consensus-specs.git
synced 2026-02-02 20:05:33 -05:00
get_randao_mix slot boundary fix
This commit is contained in:
@@ -966,8 +966,8 @@ def get_randao_mix(state: BeaconState,
|
||||
"""
|
||||
Returns the randao mix at a recent ``slot``.
|
||||
"""
|
||||
assert state.slot <= slot + LATEST_RANDAO_MIXES_LENGTH
|
||||
assert slot < state.slot
|
||||
assert state.slot < slot + LATEST_RANDAO_MIXES_LENGTH
|
||||
assert slot <= state.slot
|
||||
return state.latest_block_roots[slot % LATEST_RANDAO_MIXES_LENGTH]
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user