From 1c6ec43ab6a9d92081fed2fefa3bb2edd8e34926 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Tue, 15 Mar 2022 20:34:29 +0100 Subject: [PATCH] update to latest light client spec 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 --- beacon_chain/spec/light_client_sync.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/beacon_chain/spec/light_client_sync.nim b/beacon_chain/spec/light_client_sync.nim index c374e04278..4a58f6c1ef 100644 --- a/beacon_chain/spec/light_client_sync.nim +++ b/beacon_chain/spec/light_client_sync.nim @@ -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