From 295c36dc65d26ae86b600cd3d1bd91df66ff180f Mon Sep 17 00:00:00 2001 From: Matt Curtis Date: Fri, 7 Jun 2024 11:57:37 +0100 Subject: [PATCH] Host: ignore empty L1 head status from enclave --- go/host/enclave/state.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/go/host/enclave/state.go b/go/host/enclave/state.go index 3af6066278..135da41089 100644 --- a/go/host/enclave/state.go +++ b/go/host/enclave/state.go @@ -120,7 +120,10 @@ func (s *StateTracker) OnEnclaveStatus(es common.Status) { s.m.Lock() defer s.m.Unlock() s.enclaveStatusCode = es.StatusCode - s.enclaveL1Head = es.L1Head + // only update L1 head if non-empty head reported + if es.L1Head != gethutil.EmptyHash { + s.enclaveL1Head = es.L1Head + } s.enclaveL2Head = es.L2Head s.setStatus(s.calculateStatus())