Skip to content

Commit

Permalink
Add user agent to captive core config
Browse files Browse the repository at this point in the history
  • Loading branch information
chowbao committed Jan 16, 2024
1 parent 3283f4d commit 3aa64b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/export_effects.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
var effectsCmd = &cobra.Command{
Use: "export_effects",
Short: "Exports the effects data over a specified range",
Long: "Exports the effects data over a specified range to an output file."
Long: "Exports the effects data over a specified range to an output file.",
Run: func(cmd *cobra.Command, args []string) {
cmdLogger.SetLevel(logrus.InfoLevel)
endNum, strictExport, isTest, isFuture, extra := utils.MustCommonFlags(cmd.Flags(), cmdLogger)
Expand Down
5 changes: 3 additions & 2 deletions internal/utils/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ func CreateBackend(start, end uint32, archiveURLs []string) (historyArchiveBacke
var mainArchiveURLs = []string{
"https://history.stellar.org/prd/core-live/core_live_001",
"https://history.stellar.org/prd/core-live/core_live_002",
//"https://history.stellar.org/prd/core-live/core_live_003",
"https://history.stellar.org/prd/core-live/core_live_003",
}

// testnet is only used for local testing with new Protocol features
Expand All @@ -538,7 +538,7 @@ var futureArchiveURLs = []string{
}

func CreateHistoryArchiveClient(archiveURLS []string) (historyarchive.ArchiveInterface, error) {
return historyarchive.NewArchivePool(archiveURLS, historyarchive.ConnectOptions{})
return historyarchive.NewArchivePool(archiveURLS, historyarchive.ConnectOptions{UserAgent: "stellar-etl/1.0.0"})
}

// GetLatestLedgerSequence returns the latest ledger sequence
Expand Down Expand Up @@ -661,6 +661,7 @@ func (e EnvironmentDetails) CreateCaptiveCoreBackend() (*ledgerbackend.CaptiveSt
NetworkPassphrase: e.NetworkPassphrase,
HistoryArchiveURLs: e.ArchiveURLs,
UseDB: false,
UserAgent: "stellar-etl/1.0.0",
},
)
return backend, err
Expand Down

0 comments on commit 3aa64b9

Please sign in to comment.