moonbeam-foundation / crowdloan-rewards

Substrate pallet that enables parachains to issue rewards to crowdloan contributors in parachain-native tokens.
12 stars 16 forks source link

Initialize reward vec trusts user input #19

Closed JoshOrndorff closed 3 years ago

JoshOrndorff commented 3 years ago

Why pass in the index to the call rather than reading the number of accounts that are already stored.

Also, the user may specify a different limit each time.

girazoki commented 3 years ago

This approach makes sense now that we have the total number of contributors in a storage item. Before we needed to read all items from storage but now it makes sense

JoshOrndorff commented 3 years ago

This was solved in https://github.com/PureStake/crowdloan-rewards/pull/25