Skip to content

Commit

Permalink
fixed over range error cosmostation#24
Browse files Browse the repository at this point in the history
  • Loading branch information
BOSEES committed Jan 13, 2025
1 parent 03250b2 commit 8ba1cb9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (idx *CheckpointIndexer) batchSync(lastIndexPointerEpoch int64) (
idx.Infof("last finalized epoch(current_epoch -1) is %d and last index pointer epoch is %d", lastFinalizedEpoch, lastIndexPointerEpoch)
idx.Infof("new sync epoch: %d", newIndexerPointerEpoch)

for epoch := range lastFinalizedEpoch + 1 {
for epoch := int64(0); epoch <= lastFinalizedEpoch; epoch++ {
if epoch <= 1 {
continue
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func TestSyncEpoch(t *testing.T) {
assert.NoError(t, err)

// for loop until current epoch
for epoch := range currentEpoch {
for epoch := int64(0); epoch < int64(currentEpoch)+1; epoch++ {
if epoch == 0 {
t.Log("skip the zero epoch")
continue
Expand Down

0 comments on commit 8ba1cb9

Please sign in to comment.