mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-21 14:58:12 +00:00
Merge pull request #1944 from terencechain/patch-108
Update light committee for next slot
This commit is contained in:
commit
0d851a41c7
@ -1084,8 +1084,9 @@ def process_light_client_committee_updates(state: BeaconState) -> None:
|
||||
"""
|
||||
Update light client committees.
|
||||
"""
|
||||
if get_current_epoch(state) % LIGHT_CLIENT_COMMITTEE_PERIOD == 0:
|
||||
next_epoch = compute_epoch_at_slot(Slot(state.slot + 1))
|
||||
if next_epoch % LIGHT_CLIENT_COMMITTEE_PERIOD == 0:
|
||||
state.current_light_committee = state.next_light_committee
|
||||
new_committee = get_light_client_committee(state, get_current_epoch(state) + LIGHT_CLIENT_COMMITTEE_PERIOD)
|
||||
new_committee = get_light_client_committee(state, next_epoch + LIGHT_CLIENT_COMMITTEE_PERIOD)
|
||||
state.next_light_committee = committee_to_compact_committee(state, new_committee)
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user