From 6c8a77131c44ae96a53329f452aa0966f9aef0db Mon Sep 17 00:00:00 2001 From: YOSHIDA Masanori Date: Mon, 13 Nov 2023 09:36:48 +0900 Subject: [PATCH] fix the direction of CheckRefreshRequired (#123) Signed-off-by: Masanori Yoshida --- core/naive-strategy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/naive-strategy.go b/core/naive-strategy.go index 72a30fda..3f401c85 100644 --- a/core/naive-strategy.go +++ b/core/naive-strategy.go @@ -504,14 +504,14 @@ func (st *NaiveStrategy) UpdateClients(src, dst *ProvableChain, rpForRecv, rpFor // check if LC refresh is needed if !needsUpdateForSrc && doRefresh { var err error - needsUpdateForSrc, err = src.CheckRefreshRequired(dst) + needsUpdateForSrc, err = dst.CheckRefreshRequired(src) if err != nil { return nil, fmt.Errorf("failed to check if the LC on the src chain needs to be refreshed: %v", err) } } if !needsUpdateForDst && doRefresh { var err error - needsUpdateForDst, err = dst.CheckRefreshRequired(src) + needsUpdateForDst, err = src.CheckRefreshRequired(dst) if err != nil { return nil, fmt.Errorf("failed to check if the LC on the dst chain needs to be refreshed: %v", err) }