mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 00:31:07 +00:00
Safe and sane multi-item storage removal (#11490)
* Fix overlay prefix removal result * Second part of the overlay prefix removal fix. * Report only items deleted from storage in clear_prefix * Fix kill_prefix * Formatting * Remove unused code * Fixes * Fixes * Introduce clear_prefix host function v3 * Formatting * Use v2 for now * Fixes * Formatting * Docs * Child prefix removal should also hide v3 for now * Fixes * Fixes * Formatting * Fixes * apply_to_keys_whle takes start_at * apply_to_keys_whle takes start_at * apply_to_keys_whle takes start_at * Cursor API; force limits * Use unsafe deprecated functions * Formatting * Fixes * Grumbles * Fixes * Docs * Some nitpicks 🙈 * Update primitives/externalities/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Formatting * Fixes * cargo fmt * Fixes * Update primitives/io/src/lib.rs Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> * Formatting * Fixes Co-authored-by: Bastian Köcher <info@kchr.de> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
@@ -1067,6 +1067,7 @@ pub mod pallet {
|
||||
Founder::<T, I>::kill();
|
||||
Rules::<T, I>::kill();
|
||||
Candidates::<T, I>::kill();
|
||||
#[allow(deprecated)]
|
||||
SuspendedCandidates::<T, I>::remove_all(None);
|
||||
Self::deposit_event(Event::<T, I>::Unfounded { founder });
|
||||
Ok(())
|
||||
@@ -1511,6 +1512,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
// Clean up all votes.
|
||||
#[allow(deprecated)]
|
||||
<Votes<T, I>>::remove_all(None);
|
||||
|
||||
// Reward one of the voters who voted the right way.
|
||||
@@ -1695,6 +1697,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
||||
}
|
||||
|
||||
// Clean up all votes.
|
||||
#[allow(deprecated)]
|
||||
<DefenderVotes<T, I>>::remove_all(None);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user