From 01cf18ab2cd2851008632bdd1a88285da70e510f Mon Sep 17 00:00:00 2001 From: Aleksandr Bukata Date: Fri, 29 Nov 2024 14:20:04 +0000 Subject: [PATCH] fix ci --- .../ocr2/plugins/ccip/tokendata/lbtc/lbtc.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/core/services/ocr2/plugins/ccip/tokendata/lbtc/lbtc.go b/core/services/ocr2/plugins/ccip/tokendata/lbtc/lbtc.go index 127448d754..0060f99d95 100644 --- a/core/services/ocr2/plugins/ccip/tokendata/lbtc/lbtc.go +++ b/core/services/ocr2/plugins/ccip/tokendata/lbtc/lbtc.go @@ -80,13 +80,6 @@ type attestationResponse struct { Attestations []messageAttestationResponse `json:"attestations"` } -type SourceTokenData struct { - sourcePoolAddress []byte - destTokenAddress []byte - extraData []byte - destGasAmount uint32 -} - // TODO: Implement encoding/decoding var _ tokendata.Reader = &TokenDataReader{} @@ -206,6 +199,14 @@ func (s *TokenDataReader) getLBTCMessageBody(ctx context.Context, msg cciptypes. } func (s *TokenDataReader) callAttestationApi(ctx context.Context, lbtcMessageHash [32]byte) (attestationResponse, error) { + _, _, _, err := s.httpClient.Get(ctx, "", s.attestationApiTimeout) + switch { + case errors.Is(err, tokendata.ErrRateLimit): + s.setCoolDownPeriod(defaultCoolDownDuration) + return attestationResponse{}, tokendata.ErrRateLimit + case err != nil: + return attestationResponse{}, err + } return attestationResponse{}, nil }