Skip to content

Commit

Permalink
Try using the default upkeep selector as a base for upgrading
Browse files Browse the repository at this point in the history
  • Loading branch information
ferglor committed Apr 28, 2024
1 parent dbd8a3a commit 93bbc1e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,14 +305,14 @@ func (p *logEventProvider) getLogsFromBuffer(latestBlock int64) []ocr2keepers.Up
p.iterations = int(math.Ceil(float64(p.bufferV1.NumOfUpkeeps()*logLimitLow) / float64(maxResults)))
}

upkeepSelectorFn := func(id *big.Int) bool {
return id.Int64()%int64(p.iterations) == int64(p.currentIteration)
}
//upkeepSelectorFn := func(id *big.Int) bool {
// return id.Int64()%int64(p.iterations) == int64(p.currentIteration)
//}

for len(payloads) < maxResults && start <= latestBlock {
startWindow, end := getBlockWindow(start, blockRate)

logs, remaining := p.bufferV1.Dequeue(startWindow, end, logLimitLow, maxResults-len(payloads), upkeepSelectorFn)
logs, remaining := p.bufferV1.Dequeue(startWindow, end, logLimitLow, maxResults-len(payloads), DefaultUpkeepSelector)
if len(logs) > 0 {
p.lggr.Debugw("Dequeued logs", "start", start, "latestBlock", latestBlock, "logs", len(logs))
}
Expand Down

0 comments on commit 93bbc1e

Please sign in to comment.