From 894845b4dfb6e8c0eac2e6affe667c7a8d6419e5 Mon Sep 17 00:00:00 2001 From: urvisavla Date: Thu, 5 Oct 2023 09:58:03 -0700 Subject: [PATCH] Update services/horizon/internal/flags.go Co-authored-by: tamirms --- services/horizon/internal/flags.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/services/horizon/internal/flags.go b/services/horizon/internal/flags.go index 0f41a10f36..87af10a052 100644 --- a/services/horizon/internal/flags.go +++ b/services/horizon/internal/flags.go @@ -751,14 +751,14 @@ func setCaptiveCoreConfiguration(config *Config, options ApplyOptions) error { } config.NetworkPassphrase = defaultNetworkConfig.NetworkPassphrase config.HistoryArchiveURLs = defaultNetworkConfig.HistoryArchiveURLs - } - - if config.NetworkPassphrase == "" { - return fmt.Errorf("%s must be set", NetworkPassphraseFlagName) - } + } else { + if config.NetworkPassphrase == "" { + return fmt.Errorf("%s must be set", NetworkPassphraseFlagName) + } - if len(config.HistoryArchiveURLs) == 0 { - return fmt.Errorf("%s must be set", HistoryArchiveURLsFlagName) + if len(config.HistoryArchiveURLs) == 0 { + return fmt.Errorf("%s must be set", HistoryArchiveURLsFlagName) + } } config.CaptiveCoreTomlParams.CoreBinaryPath = config.CaptiveCoreBinaryPath