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
+2 -1
View File
@@ -42,7 +42,8 @@ pub fn clear_validators_and_nominators<T: Config>() {
// whenever we touch nominators counter we should update `T::SortedListProvider` as well.
Nominators::<T>::remove_all(None);
CounterForNominators::<T>::kill();
let _ = T::SortedListProvider::clear(None);
// NOTE: safe to call outside block production
T::SortedListProvider::unsafe_clear();
}
/// Grab a funded user.