Skip to content

Commit

Permalink
Remove --remote-captive-core-url flag
Browse files Browse the repository at this point in the history
  • Loading branch information
urvisavla committed Jul 3, 2023
1 parent c4f0bae commit fec78e5
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions services/horizon/internal/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,9 @@ func Flags() (*Config, support.ConfigOptions) {
OptType: types.String,
FlagDefault: "",
Required: false,
Usage: "path to stellar core binary (--remote-captive-core-url has higher precedence). If captive core is enabled, look for the stellar-core binary in $PATH by default.",
Usage: "path to stellar core binary, look for the stellar-core binary in $PATH by default.",
ConfigKey: &config.CaptiveCoreBinaryPath,
},
&support.ConfigOption{
Name: "remote-captive-core-url",
OptType: types.String,
FlagDefault: "",
Required: false,
Usage: "url to access the remote captive core server",
ConfigKey: &config.RemoteCaptiveCoreURL,
},
&support.ConfigOption{
Name: captiveCoreConfigAppendPathName,
OptType: types.String,
Expand Down Expand Up @@ -649,22 +641,14 @@ func ApplyFlags(config *Config, flags support.ConfigOptions, options ApplyOption
binaryPath = result
viper.Set(StellarCoreBinaryPathName, binaryPath)
config.CaptiveCoreBinaryPath = binaryPath
} else {
return fmt.Errorf("Invalid config: captive core requires --%s. %s",
StellarCoreBinaryPathName, captiveCoreMigrationHint)
}
} else {
config.CaptiveCoreBinaryPath = binaryPath
}
}

// Create config for local captive core
if config.EnableCaptiveCoreIngestion && config.RemoteCaptiveCoreURL == "" {

// NOTE: If both of these are set (regardless of user- or PATH-supplied
// defaults for the binary path), the Remote Captive Core URL
// takes precedence.
if config.CaptiveCoreBinaryPath == "" {
return fmt.Errorf("Invalid config: captive core requires that either --%s or --remote-captive-core-url is set. %s",
StellarCoreBinaryPathName, captiveCoreMigrationHint)
}
config.CaptiveCoreTomlParams.CoreBinaryPath = config.CaptiveCoreBinaryPath
if config.CaptiveCoreConfigPath == "" {
if options.RequireCaptiveCoreConfig {
Expand Down

0 comments on commit fec78e5

Please sign in to comment.