I am currently trying to iterate over a storage map over multiple blocks. For this I need to ensure that the StorageMap
was not modified.
My plan is to derive a hash from the current StorageMap
and save that hash in another storage item in order to check if the new call in the next block has the same StorageMap
state as the previous call. So, I derive the hash of the StorageMap
again and check for equality.
If the hashes are equal, I can use StorageMap::iter_from(raw_key)
, otherwise I return an error and request the user to call the multi-block execution again.
So: How can I derive a hash for the current StorageMap state?