Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ferglor committed Jun 10, 2024
1 parent e8eed1e commit c711079
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package logprovider

import (
"math"
"math/big"
"sort"
"sync"
Expand Down Expand Up @@ -65,10 +64,6 @@ func (o *logBufferOptions) override(lookback, blockRate, logLimit uint32) {
o.blockRate.Store(blockRate)
}

func (o *logBufferOptions) windows() int {
return int(math.Ceil(float64(o.lookback.Load()) / float64(o.blockRate.Load())))
}

type logBuffer struct {
lggr logger.Logger
opts *logBufferOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1984,11 +1984,11 @@ func TestLogEventProvider_GetLatestPayloads(t *testing.T) {
assert.Equal(t, 1000, countLogs(bufV1.queues["5"].logs))

for i := 0; i < 100; i++ {
payloads, err := provider.GetLatestPayloads(ctx)
latestPayloads, err := provider.GetLatestPayloads(ctx)

Check failure on line 1987 in core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_test.go

View workflow job for this annotation

GitHub Actions / lint

shadow: declaration of "err" shadows declaration at line 1972 (govet)
assert.NoError(t, err)

// we dequeue a maximum of 10 logs
assert.Equal(t, 10, len(payloads))
assert.Equal(t, 10, len(latestPayloads))
}

// the dequeue is evenly distributed across the 5 upkeeps
Expand Down

0 comments on commit c711079

Please sign in to comment.