Skip to content

Commit

Permalink
services/horizon: Suppress stellar-core unreachable when horizon is b…
Browse files Browse the repository at this point in the history
…uilding state. (#5108)
  • Loading branch information
urvisavla authored Nov 13, 2023
1 parent b576c34 commit 7d248ce
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions services/horizon/internal/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,14 @@ func (a *App) UpdateStellarCoreInfo(ctx context.Context) error {
return nil
}

// #4446 If the ingestion state machine is in the build state, the query can time out
// because the captive-core buffer may be full. In this case, skip the check.
if a.config.CaptiveCoreToml != nil &&
isLocalAddress(a.config.StellarCoreURL, a.config.CaptiveCoreToml.HTTPPort) &&
a.ingester != nil && a.ingester.GetCurrentState() == ingest.Build {
return nil
}

core := &stellarcore.Client{
URL: a.config.StellarCoreURL,
}
Expand Down

0 comments on commit 7d248ce

Please sign in to comment.