Skip to content

Commit

Permalink
stellar#889: removed TODO comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sreuland committed Oct 30, 2024
1 parent 80fa6a9 commit bcff1d3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/build/apps/ingest-sdk/ingestion-pipeline-code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,11 @@ func (adapter *LedgerMetadataInboundAdapter) Subscribe(receiver Processor) {
func (adapter *LedgerMetadataInboundAdapter) Run(ctx context.Context) error {

/////////////////////////////////////////////////////////////////
// TODO - make this easier for callers, move latest ledger fetch into cdp.ApplyLedgerMetadata()
// so caller doesn't have to this to start streaming from latest use case
// i.e. allow unbounded range with from=0 which can signal the same.
// Note, https://github.com/stellar/go/issues/5495 will deprecate this
// need for this type of manual retrieval of latest ledger when
// use case is to initiate streaming from latest point.
// It proposes new mechanism to trigger ApplyLedgerMetadata() to
// perform automatic resolution of 'latest ledger' instead.
historyArchive, err := historyarchive.NewArchivePool(adapter.historyArchiveURLs, historyarchive.ArchiveOptions{
ConnectOptions: storage.ConnectOptions{
UserAgent: "payment_demo",
Expand All @@ -169,7 +171,6 @@ func (adapter *LedgerMetadataInboundAdapter) Run(ctx context.Context) error {
if err != nil {
return errors.Wrap(err, "error creating history archive client")
}
// Acquire the most recent ledger on network to begin streaming from
latestNetworkLedger, err := historyArchive.GetLatestLedgerSequence()
/////////////////////////////////////////////////////////////////////

Expand Down

0 comments on commit bcff1d3

Please sign in to comment.