Skip to content

Commit

Permalink
fix the direction of CheckRefreshRequired (#123)
Browse files Browse the repository at this point in the history
Signed-off-by: Masanori Yoshida <[email protected]>
  • Loading branch information
siburu authored Nov 13, 2023
1 parent 42ebfc8 commit 6c8a771
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/naive-strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 6c8a771

Please sign in to comment.