Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try State Hook for Recovery #5290

Closed
wants to merge 4 commits into from
Closed

Try State Hook for Recovery #5290

wants to merge 4 commits into from

Conversation

ayushmishra2005
Copy link

Part of: #239

Polkadot address: 1e6LtEgMixb2vtQsEmCT8JW2Zpp3QynSxq8kcX9X54MxGTP

@ayushmishra2005 ayushmishra2005 requested a review from a team as a code owner August 8, 2024 16:13
@ayushmishra2005
Copy link
Author

@ggwpez @kianenigma could you please review?

fn try_state_friends() -> Result<(), sp_runtime::TryRuntimeError> {
Recoverable::<T>::iter().try_for_each(|(_, recovery_config)| -> DispatchResult {
ensure!(
recovery_config.friends.len() as u32 <= T::MaxFriends::get(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

friends is a bounded vec, which are guaranteed on a type level to never exceed their allowed length:

type FriendsOf<T> = BoundedVec<<T as frame_system::Config>::AccountId, <T as Config>::MaxFriends>;

So i dont see how this is useful.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ggwpez Any suggestion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants