Skip to content

Commit

Permalink
fix(cannon): Prevent checkpoint iterators going beyond head of chain
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm committed Sep 29, 2023
1 parent 6210659 commit d118020
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cannon/iterator/checkpoint_iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (c *CheckpointIterator) Next(ctx context.Context) (next *xatu.CannonLocatio

c.metrics.SetTrailingEpochs(c.cannonType.String(), c.networkName, c.checkpointName, float64(checkpoint.Epoch-locationEpoch))

if locationEpoch == checkpoint.Epoch {
if locationEpoch >= checkpoint.Epoch {
// Sleep until the next epoch
epoch := c.wallclock.Epochs().Current()

Expand Down

0 comments on commit d118020

Please sign in to comment.