Questions tagged [iteration]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
35 views

Iterating on a storage from Offchain Worker Concerns

I have a StorageMap named PublicKeyToMsaId which has around 300K inserted items and I want to iterate on all of those keys-values in offchain-worker to create a reverse map in offchain storage. To ...
Aramik M's user avatar
3 votes
2 answers
35 views

How to check if a `StorageMap` changed after the last access?

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 ...
Chralt's user avatar
  • 523
2 votes
1 answer
33 views

How to select n random keys from a `StorageMap`?

Assume I have the following storage map: ZAccounts: StorageMap(AccountId -> AccountInfoOf<T>) Is there a simple way to draw n AccountId's randomly. I assume that I already have a secure ...
Chralt's user avatar
  • 523