Skip to content

Commit a1e41ea

Browse files
committed
fix: ignored client state errors for now
1 parent f1adba7 commit a1e41ea

File tree

1 file changed

+5
-23
lines changed

1 file changed

+5
-23
lines changed

relayer/chains/wasm/wasm_chain_processor.go

+5-23
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ const (
8989
queryTimeout = 5 * time.Second
9090
blockResultsQueryTimeout = 2 * time.Minute
9191
latestHeightQueryRetryDelay = 1 * time.Second
92-
clientStateQueryRetryDelay = 1 * time.Second
9392
latestHeightQueryRetries = 5
94-
clientStateQueryRetries = 5
9593

9694
// TODO: review transfer to providerConfig
9795
defaultMinQueryLoopDuration = 1 * time.Second
@@ -563,7 +561,6 @@ func (ccp *WasmChainProcessor) queryCycle(ctx context.Context, persistence *quer
563561
ccp.handleMessage(ctx, m, ibcMessagesCache)
564562
}
565563
}
566-
567564
newLatestQueriedBlock = i
568565
}
569566
if newLatestQueriedBlock == persistence.latestQueriedBlock {
@@ -581,30 +578,15 @@ func (ccp *WasmChainProcessor) queryCycle(ctx context.Context, persistence *quer
581578
}
582579

583580
for _, pp := range ccp.pathProcessors {
584-
var clientState provider.ClientState
585-
var clientID string
586-
retry.Do(func() error {
587-
clientID = pp.RelevantClientID(chainID)
588-
clientState, err = ccp.clientState(ctx, clientID)
589-
return err
590-
}, retry.Context(ctx), retry.Attempts(clientStateQueryRetries),
591-
retry.Delay(clientStateQueryRetryDelay),
592-
retry.OnRetry(func(n uint, err error) {
593-
ccp.log.Error(
594-
"Error fetching client state",
595-
zap.Uint("attempt", n+1),
596-
zap.Uint("max_attempts", clientStateQueryRetries),
597-
zap.Error(err),
598-
)
599-
}))
600-
if clientState.ClientID == "" {
601-
ccp.log.Error(
602-
"Error fetching client state after max retries",
581+
clientID := pp.RelevantClientID(chainID)
582+
clientState, err := ccp.clientState(ctx, clientID)
583+
if err != nil {
584+
ccp.log.Error("Error fetching client state",
585+
zap.String("client_id", clientID),
603586
zap.Int64("latest_queried_block", newLatestQueriedBlock),
604587
zap.Int64("last_queried_block", persistence.latestQueriedBlock),
605588
zap.Error(err),
606589
)
607-
continue
608590
}
609591

610592
pp.HandleNewData(chainID, processor.ChainProcessorCacheData{

0 commit comments

Comments
 (0)