mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 07:01:03 +00:00
Ensure all StorageVersions on Rococo/Westend are correct and migration hooks pass (#7251)
* set fastunstake storage version * fix configration migration hooks * set missing rococo versions * remove child bounties version set * future proof this configuration migration * simplify rococo migration * simplify westend version migration * typo * restore missing comments * set configuration storage version correctly * remove redundant preupgrade version check * fix version checks * remove redundant comment
This commit is contained in:
@@ -1281,6 +1281,8 @@ pub type Migrations =
|
||||
/// The runtime migrations per release.
|
||||
#[allow(deprecated, missing_docs)]
|
||||
pub mod migrations {
|
||||
use frame_support::traits::{GetStorageVersion, OnRuntimeUpgrade, StorageVersion};
|
||||
|
||||
use super::*;
|
||||
|
||||
pub type V0940 = (
|
||||
@@ -1297,8 +1299,23 @@ pub mod migrations {
|
||||
pallet_offences::migration::v1::MigrateToV1<Runtime>,
|
||||
);
|
||||
|
||||
/// Migrations that set `StorageVersion`s we missed to set.
|
||||
pub struct SetStorageVersions;
|
||||
|
||||
impl OnRuntimeUpgrade for SetStorageVersions {
|
||||
fn on_runtime_upgrade() -> Weight {
|
||||
if FastUnstake::on_chain_storage_version() < 1 {
|
||||
StorageVersion::new(1).put::<FastUnstake>();
|
||||
return RocksDbWeight::get().reads_writes(1, 1)
|
||||
}
|
||||
|
||||
RocksDbWeight::get().reads(1)
|
||||
}
|
||||
}
|
||||
|
||||
/// Unreleased migrations. Add new ones here:
|
||||
pub type Unreleased = (
|
||||
SetStorageVersions,
|
||||
// Remove UMP dispatch queue <https://github.com/paritytech/polkadot/pull/6271>
|
||||
parachains_configuration::migration::v6::MigrateToV6<Runtime>,
|
||||
ump_migrations::UpdateUmpLimits,
|
||||
|
||||
Reference in New Issue
Block a user