Skip to content

Commit

Permalink
rm code that cant be reached
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey committed Mar 2, 2024
1 parent 42daf90 commit 3206439
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions packages/relayer/indexer/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,16 +379,10 @@ func (i *Indexer) filter(ctx context.Context) error {
return errors.Wrap(err, "i.srcEthClient.HeaderByNumber")
}

latestBlockIDToCompare := latestBlock.Number.Uint64()

if i.watchMode == CrawlPastBlocks && latestBlockIDToCompare > i.numLatestBlocksToIgnoreWhenCrawling {
latestBlockIDToCompare -= i.numLatestBlocksToIgnoreWhenCrawling
}

if i.processingBlockHeight < latestBlockIDToCompare {
if i.processingBlockHeight < latestBlock.Number.Uint64() {
slog.Info("header has advanced",
"processingBlockHeight", i.processingBlockHeight,
"latestBlock", latestBlockIDToCompare,
"latestBlock", latestBlock.Number.Uint64(),
)

return i.filter(ctx)
Expand Down

0 comments on commit 3206439

Please sign in to comment.