Skip to content

Commit

Permalink
fix ci warning
Browse files Browse the repository at this point in the history
  • Loading branch information
urvisavla committed Oct 14, 2024
1 parent a136126 commit 6e049f4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions services/horizon/internal/ingest/parallel.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/stellar/go/services/horizon/internal/db2/history"
"github.com/stellar/go/support/errors"
logpkg "github.com/stellar/go/support/log"
"github.com/stellar/go/support/ordered"
)

type rangeError struct {
Expand Down Expand Up @@ -122,12 +123,12 @@ func (ps *ParallelSystems) calculateParallelLedgerBatchSize(rangeSize uint32) ui

// ensure the batch size meets min threshold
if ps.minBatchSize > 0 {
batchSize = max(batchSize, uint32(ps.minBatchSize))
batchSize = ordered.Max(batchSize, uint32(ps.minBatchSize))
}

// ensure the batch size does not exceed max threshold
if ps.maxBatchSize > 0 {
batchSize = min(batchSize, uint32(ps.maxBatchSize))
batchSize = ordered.Min(batchSize, uint32(ps.maxBatchSize))
}

// round down to the nearest multiple of HistoryCheckpointLedgerInterval
Expand Down

0 comments on commit 6e049f4

Please sign in to comment.