From fb49e3961b0ebff8bcff7af5aca99b94928f7ca1 Mon Sep 17 00:00:00 2001 From: Fergal Gribben Date: Mon, 10 Jun 2024 22:51:45 +0100 Subject: [PATCH] Please linter --- .../evmregistry/v21/logprovider/dequeue_coordinator.go | 6 +----- .../ocr2keeper/evmregistry/v21/logprovider/provider_test.go | 3 --- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/dequeue_coordinator.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/dequeue_coordinator.go index 363e7c55e49..e1f99a61649 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/dequeue_coordinator.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/dequeue_coordinator.go @@ -21,11 +21,7 @@ func (c *dequeueCoordinator) dequeueBlockWindow(start int64, latestBlock int64, return 0, 0, false } - if hasDequeued, ok := c.dequeuedMinimum[startWindow]; ok { - if !hasDequeued { - return startWindow, end, true - } - } else { + if hasDequeued, ok := c.dequeuedMinimum[startWindow]; !ok || !hasDequeued { return startWindow, end, true } } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_test.go index cce694a48dd..55ba4c513a0 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_test.go @@ -1396,7 +1396,6 @@ func TestLogEventProvider_GetLatestPayloads(t *testing.T) { assert.Equal(t, 0, blockWindowCounts[8]) assert.Equal(t, 0, blockWindowCounts[96]) assert.Equal(t, 0, blockWindowCounts[100]) - }) t.Run("a complete window with no logs present is immediately marked as having the min logs dequeued, logs are dequeued from the next window", func(t *testing.T) { @@ -1718,7 +1717,6 @@ func TestLogEventProvider_GetLatestPayloads(t *testing.T) { assert.Equal(t, true, provider.dequeueCoordinator.dequeuedMinimum[0]) assert.Equal(t, true, provider.dequeueCoordinator.dequeuedMinimum[4]) assert.Equal(t, true, provider.dequeueCoordinator.dequeuedMinimum[8]) - }) t.Run("an incomplete window with minimum logs already present is marked as min dequeued", func(t *testing.T) { @@ -1907,7 +1905,6 @@ func TestLogEventProvider_GetLatestPayloads(t *testing.T) { assert.Equal(t, 70, blockWindowCounts[0]) assert.Equal(t, 190, blockWindowCounts[4]) }) - } type mockedPacker struct {