Skip to content

Conversation

ahnaguib
Copy link
Contributor

Remove emit ReportTimestampOutOfRange so getData is read only

Remove emit ReportTimestampOutOfRange so getData is read only
Copy link

openzeppelin-code bot commented Aug 21, 2024

Remove emit ReportTimestampOutOfRange so getData is read only

Generated at commit: 27bee4425481554ed859981639f1612a8384d0d7

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
1
1
0
5
23
30
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

@aalavandhan
Copy link
Member

aalavandhan commented Aug 21, 2024

Yea. Good call. Was meaning to do this too.

if (reportTimestampPast < minValidTimestamp) {
// Past report is too old.
emit ReportTimestampOutOfRange(providerAddress);
// Deprecated: emit ReportTimestampOutOfRange(providerAddress);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just remove it, rather than commenting it out. Dont think any of our off-chain services rely on this log.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is a good idea to leave so that previous logs are still understandable

Copy link
Member

@brandoniles brandoniles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good... can we also add the view modifier to the getData() signature?

@ahnaguib ahnaguib merged commit dda5b9f into master Mar 31, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants