Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
remove stale migrations (#5694)
Browse files Browse the repository at this point in the history
* polkadot: remove stale migrations

* kusama: remove stale migrations
  • Loading branch information
coderobe authored Jun 17, 2022
1 parent 6f4ef5f commit db8e7ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 36 deletions.
21 changes: 1 addition & 20 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1600,30 +1600,11 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
(
RenameBagsListToVoterList,
pallet_bags_list::migrations::AddScore<Runtime>,
pallet_nomination_pools::migration::v1::MigrateToV1<Runtime>,
),
(),
>;
/// The payload being signed in the transactions.
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;

/// 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;
Expand Down
17 changes: 1 addition & 16 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1515,26 +1515,11 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
(RenameBagsListToVoterList, pallet_bags_list::migrations::AddScore<Runtime>),
(),
>;
/// The payload being signed in transactions.
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;

/// 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;
Expand Down

0 comments on commit db8e7ef

Please sign in to comment.