mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-12 19:54:34 +00:00
fix assert conditions in get_block_hash
This commit is contained in:
parent
0de7240452
commit
36e26c86a3
@ -902,7 +902,8 @@ def get_block_root(state: BeaconState,
|
||||
"""
|
||||
Returns the block root at a recent ``slot``.
|
||||
"""
|
||||
assert slot > state.slot - LATEST_BLOCK_ROOTS_LENGTH
|
||||
assert state.slot <= slot + LATEST_BLOCK_ROOTS_LENGTH
|
||||
assert slot < state.slot
|
||||
return state.latest_block_roots[slot % LATEST_BLOCK_ROOTS_LENGTH]
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user