Merge pull request #2814 from etan-status/lc-opt-fin

Ensure light client `optimistic_header` to be at head
This commit is contained in:
Danny Ryan 2022-02-09 10:06:57 -07:00 committed by GitHub
commit 5a09b5f8a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -214,6 +214,8 @@ def apply_light_client_update(store: LightClientStore, update: LightClientUpdate
store.current_sync_committee = store.next_sync_committee store.current_sync_committee = store.next_sync_committee
store.next_sync_committee = update.next_sync_committee store.next_sync_committee = update.next_sync_committee
store.finalized_header = active_header store.finalized_header = active_header
if store.finalized_header.slot > store.optimistic_header.slot:
store.optimistic_header = store.finalized_header
``` ```
#### `process_light_client_update` #### `process_light_client_update`