mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 17:01:09 +00:00
Frame remove_all with size limit. (#9106)
* remove prefixed content with limit. * test match * factor comment and factor ext limit removal. * fix benchmark Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -2655,9 +2655,9 @@ impl<T: Config> Pallet<T> {
|
||||
|
||||
/// Clear all era information for given era.
|
||||
fn clear_era_information(era_index: EraIndex) {
|
||||
<ErasStakers<T>>::remove_prefix(era_index);
|
||||
<ErasStakersClipped<T>>::remove_prefix(era_index);
|
||||
<ErasValidatorPrefs<T>>::remove_prefix(era_index);
|
||||
<ErasStakers<T>>::remove_prefix(era_index, None);
|
||||
<ErasStakersClipped<T>>::remove_prefix(era_index, None);
|
||||
<ErasValidatorPrefs<T>>::remove_prefix(era_index, None);
|
||||
<ErasValidatorReward<T>>::remove(era_index);
|
||||
<ErasRewardPoints<T>>::remove(era_index);
|
||||
<ErasTotalStake<T>>::remove(era_index);
|
||||
|
||||
@@ -543,8 +543,8 @@ impl<'a, T: 'a + Config> Drop for InspectingSpans<'a, T> {
|
||||
|
||||
/// Clear slashing metadata for an obsolete era.
|
||||
pub(crate) fn clear_era_metadata<T: Config>(obsolete_era: EraIndex) {
|
||||
<Pallet<T> as Store>::ValidatorSlashInEra::remove_prefix(&obsolete_era);
|
||||
<Pallet<T> as Store>::NominatorSlashInEra::remove_prefix(&obsolete_era);
|
||||
<Pallet<T> as Store>::ValidatorSlashInEra::remove_prefix(&obsolete_era, None);
|
||||
<Pallet<T> as Store>::NominatorSlashInEra::remove_prefix(&obsolete_era, None);
|
||||
}
|
||||
|
||||
/// Clear slashing metadata for a dead account.
|
||||
|
||||
@@ -29,8 +29,8 @@ const SEED: u32 = 0;
|
||||
|
||||
/// This function removes all validators and nominators from storage.
|
||||
pub fn clear_validators_and_nominators<T: Config>() {
|
||||
Validators::<T>::remove_all();
|
||||
Nominators::<T>::remove_all();
|
||||
Validators::<T>::remove_all(None);
|
||||
Nominators::<T>::remove_all(None);
|
||||
}
|
||||
|
||||
/// Grab a funded user.
|
||||
|
||||
Reference in New Issue
Block a user