Merge pull request #3220 from benjaminion/fc-genesis-block

Add genesis_block to get_forkchoice_store() params
This commit is contained in:
Hsiao-Wei Wang
2023-01-24 22:22:25 +08:00
committed by GitHub

View File

@@ -43,7 +43,7 @@ This document is the beacon chain fork choice spec, part of Phase 0. It assumes
## Fork choice
The head block root associated with a `store` is defined as `get_head(store)`. At genesis, let `store = get_forkchoice_store(genesis_state)` and update `store` by running:
The head block root associated with a `store` is defined as `get_head(store)`. At genesis, let `store = get_forkchoice_store(genesis_state, genesis_block)` and update `store` by running:
- `on_tick(store, time)` whenever `time > store.time` where `time` is the current Unix time
- `on_block(store, block)` whenever a block `block: SignedBeaconBlock` is received
@@ -485,4 +485,4 @@ def on_attester_slashing(store: Store, attester_slashing: AttesterSlashing) -> N
indices = set(attestation_1.attesting_indices).intersection(attestation_2.attesting_indices)
for index in indices:
store.equivocating_indices.add(index)
```
```