Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions frame/staking/src/pallet/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -668,12 +668,9 @@ impl<T: Config> Pallet<T> {

/// Clear all era information for given era.
pub(crate) fn clear_era_information(era_index: EraIndex) {
#[allow(deprecated)]
<ErasStakers<T>>::remove_prefix(era_index, None);
#[allow(deprecated)]
<ErasStakersClipped<T>>::remove_prefix(era_index, None);
#[allow(deprecated)]
<ErasValidatorPrefs<T>>::remove_prefix(era_index, None);
debug_assert!(<ErasStakers<T>>::clear_prefix(era_index, u32::MAX, None).maybe_cursor.is_none());
debug_assert!(<ErasStakersClipped<T>>::clear_prefix(era_index, u32::MAX, None).maybe_cursor.is_none());
debug_assert!(<ErasValidatorPrefs<T>>::clear_prefix(era_index, u32::MAX, None).maybe_cursor.is_none());
<ErasValidatorReward<T>>::remove(era_index);
<ErasRewardPoints<T>>::remove(era_index);
<ErasTotalStake<T>>::remove(era_index);
Expand Down