Skip to content
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

fix: don't remove while iterating #5460

Merged
merged 1 commit into from
Nov 29, 2024
Merged

fix: don't remove while iterating #5460

merged 1 commit into from
Nov 29, 2024

Conversation

kylezs
Copy link
Contributor

@kylezs kylezs commented Nov 29, 2024

Pull Request

Checklist

Please conduct a thorough self-review before opening the PR.

  • I am confident that the code works.
  • I have written sufficient tests.
  • I have written and tested required migrations.
  • I have updated documentation where appropriate.

Summary

The docs here: https://paritytech.github.io/polkadot-sdk/master/frame_support/storage/trait.IterableStorageMap.html#tymethod.iter_keys say you shouldn't remove when iterating, so even though it's probably ok, best not to.

@kylezs kylezs requested a review from nmammeri November 29, 2024 13:59
@kylezs kylezs requested a review from dandanlen as a code owner November 29, 2024 13:59
Copy link

codecov bot commented Nov 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71%. Comparing base (a2fcb8f) to head (20e036f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff           @@
##            main   #5460    +/-   ##
======================================
- Coverage     72%     71%    -0%     
======================================
  Files        494     494            
  Lines      87703   87580   -123     
  Branches   87703   87580   -123     
======================================
- Hits       62711   62532   -179     
- Misses     22381   22435    +54     
- Partials    2611    2613     +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kylezs kylezs added this pull request to the merge queue Nov 29, 2024
Merged via the queue into main with commit 9ce39b7 Nov 29, 2024
49 checks passed
@kylezs kylezs deleted the fix/no-remove-while-iter branch November 29, 2024 16:11
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.

2 participants