Skip to content

Commit

Permalink
fix minor indexing error in logging
Browse files Browse the repository at this point in the history
  • Loading branch information
alecps committed Dec 18, 2024
1 parent cb1bc36 commit 66c7b86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions op-chain-ops/cmd/celo-migrate/ancients.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func readAncientBlocks(ctx context.Context, freezer *rawdb.Freezer, startBlock,
case <-ctx.Done():
return ctx.Err()
default:
count := min(batchSize, endBlock-i+1)
count := min(batchSize, endBlock-i)
start := i

blockRange := RLPBlockRange{
Expand Down Expand Up @@ -267,7 +267,7 @@ func writeAncientBlocks(ctx context.Context, freezer *rawdb.Freezer, in <-chan R
return fmt.Errorf("failed to write block range: %w", err)
}
blockRangeEnd := blockRange.start + uint64(len(blockRange.hashes)) - 1
log.Info("Wrote ancient blocks", "start", blockRange.start, "end", blockRangeEnd, "count", len(blockRange.hashes), "remaining", totalAncientBlocks-blockRangeEnd)
log.Info("Wrote ancient blocks", "start", blockRange.start, "end", blockRangeEnd, "count", len(blockRange.hashes), "remaining", totalAncientBlocks-(blockRangeEnd+1))
}
}
return nil
Expand Down

0 comments on commit 66c7b86

Please sign in to comment.