update to latest light client spec (#3508)

Adds the additional check to ensure `optimistic_header` is always after
`finalized_header` in `LightClientStore`, as introduced to the spec in
https://github.com/ethereum/consensus-specs/pull/2814
This commit is contained in:
Etan Kissling 2022-03-16 12:56:38 +01:00 committed by GitHub
parent 8fbcf29775
commit 88af3f2797
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -302,6 +302,8 @@ func apply_light_client_update(
didProgress = true
if active_header.slot > store.finalized_header.slot:
store.finalized_header = active_header
if store.finalized_header.slot > store.optimistic_header.slot:
store.optimistic_header = store.finalized_header
didProgress = true
didProgress