From 242ecbaef101d0fe8387a1954c587c59247bea27 Mon Sep 17 00:00:00 2001 From: Augustus Chang Date: Mon, 5 Aug 2024 11:36:11 -0400 Subject: [PATCH] update the cache used for LatestRoundRequested --- relayer/pkg/chainlink/ocr2/contract_reader.go | 1 + relayer/pkg/chainlink/ocr2/transmissions_cache.go | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/relayer/pkg/chainlink/ocr2/contract_reader.go b/relayer/pkg/chainlink/ocr2/contract_reader.go index 2ce41622d..0f01a0eda 100644 --- a/relayer/pkg/chainlink/ocr2/contract_reader.go +++ b/relayer/pkg/chainlink/ocr2/contract_reader.go @@ -101,6 +101,7 @@ func (c *contractReader) LatestTransmissionDetails( return } +// round will never be requested on Starknet func (c *contractReader) LatestRoundRequested( ctx context.Context, lookback time.Duration, diff --git a/relayer/pkg/chainlink/ocr2/transmissions_cache.go b/relayer/pkg/chainlink/ocr2/transmissions_cache.go index 851de28bf..be3a14d93 100644 --- a/relayer/pkg/chainlink/ocr2/transmissions_cache.go +++ b/relayer/pkg/chainlink/ocr2/transmissions_cache.go @@ -121,6 +121,7 @@ func (c *transmissionsCache) LatestTransmissionDetails( return } +// round will never be requested on Starknet func (c *transmissionsCache) LatestRoundRequested( ctx context.Context, lookback time.Duration, @@ -133,9 +134,8 @@ func (c *transmissionsCache) LatestRoundRequested( c.tdLock.RLock() defer c.tdLock.RUnlock() configDigest = c.transmissionDetails.Digest - epoch = c.transmissionDetails.Epoch - round = c.transmissionDetails.Round - err = c.assertTransmissionsNotStale() + epoch = 0 + round = 0 return }