Skip to content

Commit

Permalink
Add tests showing reorg handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ferglor committed Jun 9, 2024
1 parent 18d653c commit 4cb35f4
Show file tree
Hide file tree
Showing 2 changed files with 392 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ func (c *dequeueCoordinator) markReorg(block int64, blockRate uint32) {

startWindow, _ := getBlockWindow(block, int(blockRate))
c.dequeuedMinimum[startWindow] = false
// TODO instead of wiping the count for all upkeeps, should we wipe for upkeeps only impacted by the reorg?
for upkeepID := range c.dequeuedUpkeeps[startWindow] {
c.dequeuedUpkeeps[startWindow][upkeepID] = 0
}
}

func (c *dequeueCoordinator) updateBlockWindow(startWindow int64, logs, remaining, numberOfUpkeeps, logLimitLow int) {
Expand Down
Loading

0 comments on commit 4cb35f4

Please sign in to comment.