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:
parent
8fbcf29775
commit
88af3f2797
|
@ -302,6 +302,8 @@ func apply_light_client_update(
|
||||||
didProgress = true
|
didProgress = true
|
||||||
if active_header.slot > store.finalized_header.slot:
|
if active_header.slot > store.finalized_header.slot:
|
||||||
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
|
||||||
didProgress = true
|
didProgress = true
|
||||||
didProgress
|
didProgress
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue