Skip to content

Commit

Permalink
handle no last finalized height scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
zale144 committed Jan 1, 2025
1 parent f71ce62 commit 9ce53fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion eibc/lp.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func (or *orderTracker) loadLPs(ctx context.Context) error {
if len(or.lps) == 0 {
or.logger.Info("no LPs found")
} else {
or.logger.Info("loaded LPs", zap.Int("count", len(or.lps)))
or.logger.Debug("loaded LPs", zap.Int("count", len(or.lps)))
}

if lpsUpdated || (currentLPCount > 0 && len(or.lps) > currentLPCount) {
Expand Down
4 changes: 3 additions & 1 deletion eibc/order_poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ func (p *orderPoller) getRollappDemandOrdersFromIndexer(ctx context.Context, rol
RollappId: rollappId,
Finalized: true,
})
if err == nil {
if err != nil {
p.logger.Warn("failed to get latest height, using 0", zap.Error(err))
} else {
lastFinalizedHeight = fmt.Sprint(lastHeightResp.Height)
}

Expand Down

0 comments on commit 9ce53fe

Please sign in to comment.