Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

services/horizon: clean up duplicate captive-core default config files #5293

Merged
merged 2 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
195 changes: 0 additions & 195 deletions services/horizon/internal/configs/captive-core-pubnet.cfg

This file was deleted.

28 changes: 0 additions & 28 deletions services/horizon/internal/configs/captive-core-testnet.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion services/horizon/internal/docs/GUIDE_FOR_DEVELOPERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Add a debug configuration in your IDE to attach a debugger to the local Horizon
"program": "${workspaceRoot}/services/horizon/main.go",
"env": {
"DATABASE_URL": "postgres://postgres@localhost:5432/horizon?sslmode=disable",
"CAPTIVE_CORE_CONFIG_APPEND_PATH": "./services/horizon/internal/configs/captive-core-testnet.cfg",
"CAPTIVE_CORE_CONFIG_APPEND_PATH": "./ingest/ledgerbackend/configs/captive-core-testnet.cfg",
"HISTORY_ARCHIVE_URLS": "https://history.stellar.org/prd/core-testnet/core_testnet_001,https://history.stellar.org/prd/core-testnet/core_testnet_002",
"NETWORK_PASSPHRASE": "Test SDF Network ; September 2015",
"PER_HOUR_RATE_LIMIT": "0"
Expand Down
10 changes: 2 additions & 8 deletions services/horizon/internal/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -835,20 +835,14 @@ type networkConfig struct {
}

var (
//go:embed configs/captive-core-pubnet.cfg
PubnetDefaultConfig []byte

//go:embed configs/captive-core-testnet.cfg
TestnetDefaultConfig []byte

PubnetConf = networkConfig{
defaultConfig: PubnetDefaultConfig,
defaultConfig: ledgerbackend.PubnetDefaultConfig,
HistoryArchiveURLs: network.PublicNetworkhistoryArchiveURLs,
NetworkPassphrase: network.PublicNetworkPassphrase,
}

TestnetConf = networkConfig{
defaultConfig: TestnetDefaultConfig,
defaultConfig: ledgerbackend.TestnetDefaultConfig,
HistoryArchiveURLs: network.TestNetworkhistoryArchiveURLs,
NetworkPassphrase: network.TestNetworkPassphrase,
}
Expand Down
4 changes: 2 additions & 2 deletions services/horizon/internal/flags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func Test_createCaptiveCoreConfig(t *testing.T) {
config: Config{
NetworkPassphrase: PubnetConf.NetworkPassphrase,
HistoryArchiveURLs: PubnetConf.HistoryArchiveURLs,
CaptiveCoreConfigPath: "configs/captive-core-pubnet.cfg",
CaptiveCoreConfigPath: "../../../ingest/ledgerbackend/configs/captive-core-pubnet.cfg",
CaptiveCoreBinaryPath: "/path/to/captive-core/binary",
},
networkPassphrase: PubnetConf.NetworkPassphrase,
Expand Down Expand Up @@ -171,7 +171,7 @@ func Test_createCaptiveCoreConfig(t *testing.T) {
config: Config{
NetworkPassphrase: PubnetConf.NetworkPassphrase,
HistoryArchiveURLs: PubnetConf.HistoryArchiveURLs,
CaptiveCoreConfigPath: "configs/captive-core-testnet.cfg",
CaptiveCoreConfigPath: "../../../ingest/ledgerbackend/configs/captive-core-testnet.cfg",
CaptiveCoreBinaryPath: "/path/to/captive-core/binary",
},
errStr: fmt.Sprintf("invalid captive core toml file: invalid captive core toml: "+
Expand Down
Loading