-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Going to through the staking code it's obvious that the way we choose to iterate across store records is totally inconsistent, sometimes we use a "retrieveAll" functionality which iterates and returns and array of all the records, which is then received and simply looped over. Other times we use an iterator function which takes an "operating function". Other times we a special keeper function which returns and sdk.Iterator which is then utilized in higher level function. There appears to be duplication of Iterators based on fulfilling the sdk.ValidatorSet/ sdk.DelegationSet
I'm not saying there isn't reason to have some variability in our iteration approach, it just seem that things need to be consolidated and re-evaluated as they've been slapped together.
I'm assuming that this also exists in other modules and should also be rectified.