From c4d255748c6cb06c789fc0c0c01271dd8ff504aa Mon Sep 17 00:00:00 2001 From: Mara Broda Date: Fri, 17 Jun 2022 17:31:38 +0200 Subject: [PATCH 1/2] polkadot: remove stale migrations --- runtime/polkadot/src/lib.rs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 419af3d4c818..d2ed4ac5dfc1 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1515,26 +1515,11 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - (RenameBagsListToVoterList, pallet_bags_list::migrations::AddScore), + (), >; /// The payload being signed in transactions. pub type SignedPayload = generic::SignedPayload; -/// A migration which renames the pallet `BagsList` to `VoterList` -pub struct RenameBagsListToVoterList; -impl frame_support::traits::OnRuntimeUpgrade for RenameBagsListToVoterList { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result<(), &'static str> { - // For other pre-upgrade checks, we need the storage to already be migrated. - frame_support::storage::migration::move_pallet(b"BagsList", b"VoterList"); - Ok(()) - } - fn on_runtime_upgrade() -> frame_support::weights::Weight { - frame_support::storage::migration::move_pallet(b"BagsList", b"VoterList"); - frame_support::weights::Weight::MAX - } -} - #[cfg(feature = "runtime-benchmarks")] #[macro_use] extern crate frame_benchmarking; From c4edf737780c6913cfd614252ca6534ea1769dbb Mon Sep 17 00:00:00 2001 From: Mara Broda Date: Fri, 17 Jun 2022 17:30:18 +0200 Subject: [PATCH 2/2] kusama: remove stale migrations --- runtime/kusama/src/lib.rs | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 5f81e9cdd46b..bee31b884c71 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1600,30 +1600,11 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - ( - RenameBagsListToVoterList, - pallet_bags_list::migrations::AddScore, - pallet_nomination_pools::migration::v1::MigrateToV1, - ), + (), >; /// The payload being signed in the transactions. pub type SignedPayload = generic::SignedPayload; -/// A migration which renames the pallet `BagsList` to `VoterList` -pub struct RenameBagsListToVoterList; -impl frame_support::traits::OnRuntimeUpgrade for RenameBagsListToVoterList { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result<(), &'static str> { - // For other pre-upgrade checks, we need the storage to already be migrated. - frame_support::storage::migration::move_pallet(b"BagsList", b"VoterList"); - Ok(()) - } - fn on_runtime_upgrade() -> frame_support::weights::Weight { - frame_support::storage::migration::move_pallet(b"BagsList", b"VoterList"); - frame_support::weights::Weight::MAX - } -} - #[cfg(feature = "runtime-benchmarks")] #[macro_use] extern crate frame_benchmarking;