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

consider using OptionQuery instead of ValueQuery for more pallet storages #338

Open
brenzi opened this issue Jul 26, 2023 · 1 comment
Open

Comments

@brenzi
Copy link
Member

brenzi commented Jul 26, 2023

ValueQuery just returns default if the storage is empty. That only makes sense in very few situations
It seems our migration to frameV2 defaulted to ValueQuery.

In the case of CommunityMetadata and possibly others I may question this choice.

@clangenb do you remember if there was a specific reason to use ValueQuery?

@brenzi brenzi changed the title consider using OptionQuery instead of ValueQuery for many pallet storages consider using OptionQuery instead of ValueQuery for more pallet storages Jul 26, 2023
@clangenb
Copy link
Member

No, the only reason I see is that it introduced less breaking changes in pallet code, as this was the default before. I do question some value queries too.

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

No branches or pull requests

2 participants