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

Substrate FRAME Storage remove_all API should have a key limit #29

Closed
hoanglamhuynh opened this issue Jun 11, 2021 · 1 comment
Closed

Comments

@hoanglamhuynh
Copy link
Owner

paritytech/substrate#9002

> Similar to the storage_kill api in child tries, the remove_all api on any maps should also have an optional key limit to enforce weight restrictions.
>
> #8166
>
> When calling remove_all, a user should also be able to include Option<u32>, which describes the maximum number of keys that can be removed at once.
>
> At the end of the operation, you can return AllRemoved(u32) or SomeReamining(u32) with the number of items that were actually removed at the end of the operation.
>
> Should reuse and rename KillChildStorageResult:
>
> https://github.com/paritytech/substrate/blob/master/primitives/io/src/lib.rs#L89

Author: Henry Lam

Link: https://stackoverflow.com/questions/67817077/substrate-frame-storage-remove-all-api-should-have-a-key-limit

@hoanglamhuynh
Copy link
Owner Author

This is an exact copy of the text at paritytech/substrate#9002. Why paste this as a question? Can you add more context?

Author: SirDarius

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

No branches or pull requests

1 participant