Skip to content

Commit

Permalink
add pallet nomination-pools versioned migration to kitchensink (parit…
Browse files Browse the repository at this point in the history
…ytech#2167)

The versioned migrations are already there in pallet nomination-pools:

https://github.com/paritytech/polkadot-sdk/blob/1766468c930299358fc13940e50d973fe734ba5c/substrate/frame/nomination-pools/src/migration.rs#L27-L48

Just updating the kitchensink runtime to point to them.

This is also nice because it points the dev to an example of how to use
`VersionedMigration`.
  • Loading branch information
brunopgalvao authored Nov 17, 2023
1 parent a542ba6 commit 3e80eb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions substrate/bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2194,9 +2194,10 @@ pub type Executive = frame_executive::Executive<
>;

// All migrations executed on runtime upgrade as a nested tuple of types implementing
// `OnRuntimeUpgrade`.
// `OnRuntimeUpgrade`. Note: These are examples and do not need to be run directly
// after the genesis block.
type Migrations = (
pallet_nomination_pools::migration::v2::MigrateToV2<Runtime>,
pallet_nomination_pools::migration::versioned::V6ToV7<Runtime>,
pallet_alliance::migration::Migration<Runtime>,
pallet_contracts::Migration<Runtime>,
);
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/nomination-pools/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use sp_std::{collections::btree_map::BTreeMap, vec::Vec};
use sp_runtime::TryRuntimeError;

/// Exports for versioned migration `type`s for this pallet.
pub mod versioned_migrations {
pub mod versioned {
use super::*;

/// Migration V6 to V7 wrapped in a [`frame_support::migrations::VersionedMigration`], ensuring
Expand Down

0 comments on commit 3e80eb9

Please sign in to comment.