mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 14:41:11 +00:00
Use #[pallet::storage_version] for pallet staking (#12728)
* delete releases * use standard pallet storage version * migrate to standard storage version for staking * not compiling * keep old releases enum around for decoding * fix releases * rename old releases * retriggering ci * fix migration comments * doc update Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -881,31 +881,6 @@ impl Default for Forcing {
|
||||
}
|
||||
}
|
||||
|
||||
// A value placed in storage that represents the current version of the Staking storage. This value
|
||||
// is used by the `on_runtime_upgrade` logic to determine whether we run storage migration logic.
|
||||
// This should match directly with the semantic versions of the Rust crate.
|
||||
#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)]
|
||||
enum Releases {
|
||||
V1_0_0Ancient,
|
||||
V2_0_0,
|
||||
V3_0_0,
|
||||
V4_0_0,
|
||||
V5_0_0, // blockable validators.
|
||||
V6_0_0, // removal of all storage associated with offchain phragmen.
|
||||
V7_0_0, // keep track of number of nominators / validators in map
|
||||
V8_0_0, // populate `VoterList`.
|
||||
V9_0_0, // inject validators into `VoterList` as well.
|
||||
V10_0_0, // remove `EarliestUnappliedSlash`.
|
||||
V11_0_0, // Move pallet storage prefix, e.g. BagsList -> VoterBagsList
|
||||
V12_0_0, // remove `HistoryDepth`.
|
||||
}
|
||||
|
||||
impl Default for Releases {
|
||||
fn default() -> Self {
|
||||
Releases::V11_0_0
|
||||
}
|
||||
}
|
||||
|
||||
/// A `Convert` implementation that finds the stash of the given controller account,
|
||||
/// if any.
|
||||
pub struct StashOf<T>(sp_std::marker::PhantomData<T>);
|
||||
|
||||
Reference in New Issue
Block a user