Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mask-pp committed Aug 28, 2023
1 parent 1e1eb24 commit 2d05235
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/controller/l1_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ func (l1 *L1Watcher) ScanL1Chain(ctx context.Context) {
log.Error("failed to get l1Chain start and end number", "err", err)
return
}
if start > end {
return
}

cts := l1.contracts

err = cts.ParseL1Events(ctx, start, end)
if err != nil {
log.Error("failed to parse l1chain events", "start", start, "end", end, "err", err)
Expand Down
3 changes: 3 additions & 0 deletions internal/controller/l2_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ func (l2 *L2Watcher) ScanL2Chain(ctx context.Context) {
log.Error("l2Watcher failed to get start and end number", "err", err)
return
}
if start > end {
return
}

cts := l2.contracts
err = cts.ParseL2Events(ctx, start, end)
Expand Down

0 comments on commit 2d05235

Please sign in to comment.