diff --git a/services/horizon/internal/flags.go b/services/horizon/internal/flags.go index be08193c2c..fdcc17dc6e 100644 --- a/services/horizon/internal/flags.go +++ b/services/horizon/internal/flags.go @@ -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, @@ -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 {