Skip to content

Commit

Permalink
Remove enable-captive-core-ingestion support - 2
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya1702 committed Nov 1, 2023
1 parent a0a0a0e commit 992aa3d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions services/horizon/internal/ingest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ type Config struct {
CoreSession db.SessionInterface
StellarCoreURL string
StellarCoreCursor string
EnableCaptiveCore bool
CaptiveCoreBinaryPath string
CaptiveCoreStoragePath string
CaptiveCoreToml *ledgerbackend.CaptiveCoreToml
Expand Down Expand Up @@ -108,16 +107,14 @@ type Config struct {
// LocalCaptiveCoreEnabled returns true if configured to run
// a local captive core instance for ingestion.
func (c Config) LocalCaptiveCoreEnabled() bool {
// c.EnableCaptiveCore is true for both local and remote captive core
// and c.RemoteCaptiveCoreURL is always empty when running
// local captive core.
return c.EnableCaptiveCore && c.RemoteCaptiveCoreURL == ""
// c.RemoteCaptiveCoreURL is always empty when running local captive core.
return c.RemoteCaptiveCoreURL == ""
}

// RemoteCaptiveCoreEnabled returns true if configured to run
// a remote captive core instance for ingestion.
func (c Config) RemoteCaptiveCoreEnabled() bool {
return c.EnableCaptiveCore && c.RemoteCaptiveCoreURL != ""
return c.RemoteCaptiveCoreURL != ""
}

const (
Expand Down Expand Up @@ -741,7 +738,7 @@ func (s *system) resetStateVerificationErrors() {
}

func (s *system) updateCursor(ledgerSequence uint32) error {
if s.stellarCoreClient == nil || s.config.EnableCaptiveCore {
if s.stellarCoreClient == nil {
return nil
}

Expand Down

0 comments on commit 992aa3d

Please sign in to comment.