Skip to content

Commit

Permalink
Remove rand
Browse files Browse the repository at this point in the history
  • Loading branch information
chowbao committed Jan 16, 2024
1 parent d7f4881 commit 1aafea4
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions internal/utils/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"math/big"
"math/rand"
"time"

"github.com/spf13/pflag"
Expand Down Expand Up @@ -539,15 +538,7 @@ var futureArchiveURLs = []string{
}

func CreateHistoryArchiveClient(archiveURLS []string) (historyarchive.ArchiveInterface, error) {
var archiveInterface historyarchive.ArchiveInterface

archivePool, err := historyarchive.NewArchivePool(archiveURLS, historyarchive.ConnectOptions{UserAgent: "stellar-etl/1.0.0"})
if err != nil {
return archiveInterface, err
}

// Use random archive pool
return archivePool[int32(rand.Intn(len(archivePool)))], nil
return historyarchive.NewArchivePool(archiveURLS, historyarchive.ConnectOptions{UserAgent: "stellar-etl/1.0.0"})
}

// GetLatestLedgerSequence returns the latest ledger sequence
Expand Down

0 comments on commit 1aafea4

Please sign in to comment.