Skip to content

Commit

Permalink
services/horizon: Add LedgerHashStore to Captive-Core config (#4251)
Browse files Browse the repository at this point in the history
This commit revers LedgerHashStore removed from Horizon's CaptiveCoreConfig in:
b7fde58. This change makes it impossible to PrepareRange using Captive-Core if
there is any other ingestion instance running because CaptiveCoreBackend tries
to load the hash of the ledger from archives when LedgerHashStore is not set.
But ledgers are published every 5 minutes so they contain the hash of the latest
ledger only for a brief amount of time (the moment when checkpoint is
published).
  • Loading branch information
bartekn authored Mar 1, 2022
1 parent ee782b6 commit 498a3b3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions services/horizon/internal/ingest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ func NewSystem(config Config) (System, error) {
NetworkPassphrase: config.NetworkPassphrase,
HistoryArchiveURLs: []string{config.HistoryArchiveURL},
CheckpointFrequency: config.CheckpointFrequency,
LedgerHashStore: ledgerbackend.NewHorizonDBLedgerHashStore(config.HistorySession),
Log: logger,
Context: ctx,
},
Expand Down

0 comments on commit 498a3b3

Please sign in to comment.