mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-20 07:29:02 +00:00
Index from GENESIS_SLOT in compute_time_at_slot
Co-authored-by: Paul Hauner <paul@paulhauner.com>
This commit is contained in:
parent
ee161634b2
commit
f6f36872d8
@ -163,7 +163,8 @@ def compute_randao_mix(state: BeaconState, randao_reveal: BLSSignature) -> Bytes
|
||||
|
||||
```python
|
||||
def compute_time_at_slot(state: BeaconState, slot: Slot) -> uint64:
|
||||
return uint64(state.genesis_time + slot * SECONDS_PER_SLOT)
|
||||
slots_since_genesis = slot - GENESIS_SLOT
|
||||
return uint64(state.genesis_time + slots_since_genesis * SECONDS_PER_SLOT)
|
||||
```
|
||||
|
||||
### Beacon state accessors
|
||||
|
Loading…
x
Reference in New Issue
Block a user