-
Notifications
You must be signed in to change notification settings - Fork 138
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
Add panic after continuing storage iteration after a storage mutation #1892
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1892 +/- ##
==========================================
+ Coverage 77.65% 77.87% +0.22%
==========================================
Files 302 300 -2
Lines 61976 62239 +263
==========================================
+ Hits 48126 48470 +344
+ Misses 12128 12050 -78
+ Partials 1722 1719 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit a22f767 Collapsed results for better readability
|
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.
Nice! This is going to make the iteration feature even more useful and ergonomic 👍
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.
👍
Closes #208
Because modifying storage can arbitrarily rearrange the way that values are stored within it, we want to prevent users from iterating over a mutated storage. Thus, if users continue a storage iteration after performing a mutating operation, we will panic and abort execution. If users end iteration after their mutation however, this is safe, as no operations are performed that rely on the stored values maintaining their original, pre-mutation, arrangement.
master
branchFiles changed
in the Github PR explorer