Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaodino committed Mar 17, 2024
1 parent cb35a58 commit c8da85b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/relayer/indexer/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,9 @@ func (i *Indexer) filter(ctx context.Context) error {

if i.watchMode == CrawlPastBlocks {
slog.Info("restarting filtering from genesis")

i.processingBlockHeight = 0

return i.filter(ctx)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ func (i *Indexer) setInitialProcessingBlockByMode(

return nil
case Resync:
if i.watchMode == CrawlPastBlocks && i.processingBlockHeight > startingBlock {
return nil
}

i.processingBlockHeight = startingBlock

return nil
default:
return relayer.ErrInvalidMode
Expand Down

0 comments on commit c8da85b

Please sign in to comment.