Skip to content

Commit

Permalink
Fix bor event check start-up (#11909)
Browse files Browse the repository at this point in the history
Fixes: #11905
  • Loading branch information
mh0lt authored Sep 6, 2024
1 parent a273520 commit 5ae250f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions turbo/snapshotsync/freezeblocks/bor_snapshots.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func checkBlockEvents(ctx context.Context, config *borcfg.BorConfig, blockReader
log.Error("[integrity] NoGapsInBorEvents: invalid event id", "block", block, "event", i, "expected", prevBlockStartId+uint64(i), "got", eventId)
}
} else {
eventId = prevBlockStartId + uint64(i)
eventId = heimdall.EventId(event)
}

eventTime := heimdall.EventTime(event)
Expand Down Expand Up @@ -458,7 +458,7 @@ func checkBlockWindow(ctx context.Context, eventTime time.Time, firstBlockEventT
return initialTime.After(from)
}

return !(afterCheck(from, eventTime, firstBlockEventTime) || eventTime.After(to))
return !afterCheck(from, eventTime, firstBlockEventTime) || !eventTime.After(to)
}

type BorView struct {
Expand Down

0 comments on commit 5ae250f

Please sign in to comment.