From 1aafea460299a325c1ca9308312ec56af23433f8 Mon Sep 17 00:00:00 2001 From: Simon Chow Date: Tue, 16 Jan 2024 14:27:54 -0500 Subject: [PATCH] Remove rand --- internal/utils/main.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/internal/utils/main.go b/internal/utils/main.go index becb3779..a59c9a6a 100644 --- a/internal/utils/main.go +++ b/internal/utils/main.go @@ -6,7 +6,6 @@ import ( "errors" "fmt" "math/big" - "math/rand" "time" "github.com/spf13/pflag" @@ -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