-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove farm penalty code #966
base: rc/v3.3
Are you sure you want to change the base?
Conversation
Coverage SummaryTotals
FilesExpand
|
Contract comparison - from 79c6016 to c90362f
|
let last_update_epoch = self.epoch_last_interaction().get(); | ||
let mapper = self.timestamp_for_epoch(current_epoch); | ||
if current_epoch == last_update_epoch { | ||
return mapper.get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we should always have a value. But because we have external factors, like the owner could update the storage with overwrite, I would also put a check here that the value stored by timestamp_for_epoch is not 0. And I would go even to a require, to completely crash the execution in that particular case, to not negatively impact the rewards computation.
No description provided.