Fix pallet bags list and doc (#10231)

* fix bags list

* improve doc

* doc

* inner doc

* fix test

* Update docs in frame/election-provider-support/src/lib.rs

* fix staking impl

* prepend unsafe to clear and regenerate

* fix test

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Guillaume Thiolliere
2021-12-03 14:58:12 +09:00
committed by GitHub
parent 798e01bf9b
commit 9756615d5b
13 changed files with 76 additions and 50 deletions
+5 -1
View File
@@ -1133,7 +1133,11 @@ pub trait StoragePrefixedMap<Value: FullCodec> {
crate::storage::storage_prefix(Self::module_prefix(), Self::storage_prefix())
}
/// Remove all value of the storage.
/// Remove all values of the storage in the overlay and up to `limit` in the backend.
///
/// All values in the client overlay will be deleted, if there is some `limit` then up to
/// `limit` values are deleted from the client backend, if `limit` is none then all values in
/// the client backend are deleted.
fn remove_all(limit: Option<u32>) -> sp_io::KillStorageResult {
sp_io::storage::clear_prefix(&Self::final_prefix(), limit)
}