mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-17 21:16:52 +00:00
Update 0_beacon-chain.md
This commit is contained in:
parent
339a7fb63b
commit
e74c79e353
@ -2218,10 +2218,10 @@ At every `slot > GENESIS_SLOT` run the following function:
|
||||
|
||||
```python
|
||||
def advance_slot(state: BeaconState) -> None:
|
||||
state.slot += 1
|
||||
if state.latest_block_header.state_root == ZERO_HASH:
|
||||
state.latest_block_header.state_root = get_state_root(state, state.slot - 1)
|
||||
state.latest_block_roots[(state.slot - 1) % SLOTS_PER_HISTORICAL_ROOT] = hash_tree_root(state.latest_block_header)
|
||||
state.latest_block_header.state_root = state.latest_block_roots[state.slot % SLOTS_PER_HISTORICAL_ROOT]
|
||||
state.latest_block_roots[state.slot % SLOTS_PER_HISTORICAL_ROOT] = hash_tree_root(state.latest_block_header)
|
||||
state.slot += 1
|
||||
```
|
||||
|
||||
### Per-block processing
|
||||
|
Loading…
x
Reference in New Issue
Block a user