From 40b47a891fc0e5fb735a09d59b560338f4d60a70 Mon Sep 17 00:00:00 2001 From: Jun Kimura Date: Mon, 11 Nov 2024 21:13:34 +0900 Subject: [PATCH] fix to check if elc instance exists in `updateELC()` Signed-off-by: Jun Kimura --- relay/lcp.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/relay/lcp.go b/relay/lcp.go index 5c248c9..7989efd 100644 --- a/relay/lcp.go +++ b/relay/lcp.go @@ -282,6 +282,9 @@ func (pr *Prover) updateELC(elcClientID string, includeState bool) ([]*elc.MsgUp if err != nil { return nil, err } + if !res.Found { + return nil, fmt.Errorf("client not found: client_id=%v", elcClientID) + } latestHeader, err := pr.originProver.GetLatestFinalizedHeader() if err != nil { return nil, err