mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-06 03:18:01 +00:00
remove deprecated remove_prefix to clear era_info (#13460)
* remove deprecated remove_prefix to clear era_info * add debug assertions to check that the returned cursor is None * add a variable to hold the cursor * ".git/.scripts/commands/fmt/fmt.sh" --------- Co-authored-by: command-bot <>
This commit is contained in:
@@ -669,12 +669,12 @@ 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);
|
||||
let mut cursor = <ErasStakers<T>>::clear_prefix(era_index, u32::MAX, None);
|
||||
debug_assert!(cursor.maybe_cursor.is_none());
|
||||
cursor = <ErasStakersClipped<T>>::clear_prefix(era_index, u32::MAX, None);
|
||||
debug_assert!(cursor.maybe_cursor.is_none());
|
||||
cursor = <ErasValidatorPrefs<T>>::clear_prefix(era_index, u32::MAX, None);
|
||||
debug_assert!(cursor.maybe_cursor.is_none());
|
||||
<ErasValidatorReward<T>>::remove(era_index);
|
||||
<ErasRewardPoints<T>>::remove(era_index);
|
||||
<ErasTotalStake<T>>::remove(era_index);
|
||||
|
||||
Reference in New Issue
Block a user