The IterableStorageMap
API explicitly forbids altering the map while iterating: https://paritytech.github.io/substrate/master/src/frame_support/storage/mod.rs.html#270-272
The frame_support::storage::migration
module is less clear in its documentation. If I iterate over a storage map using storage_iter
, what's the effect of altering the map while iterating over it? What changes to the map can I make without causing undefined behavior?