Skip to content

Commit

Permalink
Merge pull request #445 from icon-project/fix/stellar-cursor-issue
Browse files Browse the repository at this point in the history
fix: fixed issue with cursor not updated
  • Loading branch information
bcsainju authored Dec 2, 2024
2 parents 51b142a + 244bbb1 commit a24c040
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions relayer/chains/steller/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@ func (p *Provider) Listener(ctx context.Context, lastProcessedTx relayertypes.La
pollInterval = p.cfg.PollInterval
}
ticker := time.NewTicker(pollInterval)
var cursor string
for {
select {
case <-ctx.Done():
return ctx.Err()
case <-ticker.C:
eventFilter := p.getEventFilter(startSeq, cursor)
eventFilter := p.getEventFilter(startSeq, "")
response, err := p.client.GetEvents(ctx, eventFilter)
if err != nil {
p.log.Warn("error occurred while fetching transactions", zap.Error(err))
Expand All @@ -63,7 +62,6 @@ func (p *Provider) Listener(ctx context.Context, lastProcessedTx relayertypes.La
Height: msg.MessageHeight, Messages: []*relayertypes.Message{msg},
}
}
cursor = ev.PagingToken
}
startSeq = response.LatestLedger
}
Expand Down

0 comments on commit a24c040

Please sign in to comment.