Skip to content

Commit 6c8a771

Browse files
authored
fix the direction of CheckRefreshRequired (#123)
Signed-off-by: Masanori Yoshida <masanori.yoshida@datachain.jp>
1 parent 42ebfc8 commit 6c8a771

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/naive-strategy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,14 +504,14 @@ func (st *NaiveStrategy) UpdateClients(src, dst *ProvableChain, rpForRecv, rpFor
504504
// check if LC refresh is needed
505505
if !needsUpdateForSrc && doRefresh {
506506
var err error
507-
needsUpdateForSrc, err = src.CheckRefreshRequired(dst)
507+
needsUpdateForSrc, err = dst.CheckRefreshRequired(src)
508508
if err != nil {
509509
return nil, fmt.Errorf("failed to check if the LC on the src chain needs to be refreshed: %v", err)
510510
}
511511
}
512512
if !needsUpdateForDst && doRefresh {
513513
var err error
514-
needsUpdateForDst, err = dst.CheckRefreshRequired(src)
514+
needsUpdateForDst, err = src.CheckRefreshRequired(dst)
515515
if err != nil {
516516
return nil, fmt.Errorf("failed to check if the LC on the dst chain needs to be refreshed: %v", err)
517517
}

0 commit comments

Comments
 (0)