Skip to content

Commit

Permalink
Correctly report row iteration errors in StreamAllLedgers (#168)
Browse files Browse the repository at this point in the history
Also, improve in-memory loading logs.
  • Loading branch information
2opremio authored May 10, 2024
1 parent f9ab1e9 commit 110ed20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cmd/soroban-rpc/internal/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,14 @@ func MustNew(cfg *config.Config) *Daemon {
}
return nil
})
if err != nil {
logger.WithError(err).Fatal("could not obtain txmeta cache from the database")
}
if currentSeq != 0 {
logger.WithFields(supportlog.F{
"seq": currentSeq,
}).Info("finished initializing in-memory store")
}
if err != nil {
logger.WithError(err).Fatal("could not obtain txmeta cache from the database")
}

onIngestionRetry := func(err error, dur time.Duration) {
logger.WithError(err).Error("could not run ingestion. Retrying")
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-rpc/internal/db/ledger.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (r ledgerReader) StreamAllLedgers(ctx context.Context, f StreamLedgerFn) er
return err
}
}
return nil
return q.Err()
}

// GetLedger fetches a single ledger from the db.
Expand Down

0 comments on commit 110ed20

Please sign in to comment.