Skip to content

Commit

Permalink
Returning messageVisibilityInterval always
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-sekara committed Jul 8, 2024
1 parent 54127b1 commit 96233e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/services/ocr2/plugins/ccip/ccipexec/ocr2.go
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,9 @@ func (r *ExecutionReportingPlugin) getUnexpiredCommitReports(
commitStoreReader ccipdata.CommitStoreReader,
lggr logger.Logger,
) ([]cciptypes.CommitStoreReport, error) {
createdAfterTimestamp := r.commitRootsCache.OldestRootTimestamp()
// Fixme Skipping value stored in the cache and always using messageVisibilityInterval for the search criteria.
// Cache is vulnerable to re-orgs and therefore can return invalid timestamps
createdAfterTimestamp := time.Now().Add(-r.offchainConfig.MessageVisibilityInterval.Duration())
lggr.Infow("Fetching unexpired commit roots from database", "createdAfterTimestamp", createdAfterTimestamp)
acceptedReports, err := commitStoreReader.GetAcceptedCommitReportsGteTimestamp(
ctx,
Expand Down

0 comments on commit 96233e8

Please sign in to comment.