mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-17 13:06:34 +00:00
Warn about potential overflows in compute_time_at_slot
This commit is contained in:
parent
dbbc63b7a3
commit
7d8570d488
@ -168,6 +168,8 @@ def is_transition_block(state: BeaconState, block_body: BeaconBlockBody) -> bool
|
||||
|
||||
#### `compute_time_at_slot`
|
||||
|
||||
*Note*: This function is unsafe with respect to overflows and underflows.
|
||||
|
||||
```python
|
||||
def compute_time_at_slot(state: BeaconState, slot: Slot) -> uint64:
|
||||
slots_since_genesis = slot - GENESIS_SLOT
|
||||
|
Loading…
x
Reference in New Issue
Block a user