Skip to content

Commit

Permalink
renamed VersionCheckedMigrateToV5 to MigrateToV5 #2264
Browse files Browse the repository at this point in the history
Signed-off-by: muraca <mmuraca247@gmail.com>
  • Loading branch information
muraca committed Nov 10, 2023
1 parent e0afcb7 commit 27b91f9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ type Migrations = (
import_kusama_fellowship::Migration<Runtime, FellowshipCollectiveInstance>,
// unreleased
pallet_collator_selection::migration::v1::MigrateToV1<Runtime>,
pallet_collective::migrations::v5::VersionCheckedMigrateToV5<Runtime, AllianceCollective>,
pallet_collective::migrations::v5::MigrateToV5<Runtime, AllianceCollective>,
);

/// Executive: handles dispatch to the various modules.
Expand Down
6 changes: 3 additions & 3 deletions substrate/bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2189,9 +2189,9 @@ type Migrations = (
pallet_nomination_pools::migration::v2::MigrateToV2<Runtime>,
pallet_alliance::migration::Migration<Runtime>,
pallet_contracts::Migration<Runtime>,
pallet_collective::migrations::v5::VersionCheckedMigrateToV5<Runtime, CouncilCollective>,
pallet_collective::migrations::v5::VersionCheckedMigrateToV5<Runtime, TechnicalCollective>,
pallet_collective::migrations::v5::VersionCheckedMigrateToV5<Runtime, AllianceCollective>,
pallet_collective::migrations::v5::MigrateToV5<Runtime, CouncilCollective>,
pallet_collective::migrations::v5::MigrateToV5<Runtime, TechnicalCollective>,
pallet_collective::migrations::v5::MigrateToV5<Runtime, AllianceCollective>,
);

type EventRecord = frame_system::EventRecord<
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/collective/src/migrations/v5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ impl<T: Config<I>, I: 'static> OnRuntimeUpgrade for VersionUncheckedMigrateToV5<

/// [`VersionUncheckedMigrateToV5`] wrapped in a [`frame_support::migrations::VersionedMigration`],
/// ensuring the migration is only performed when on-chain version is 4.
pub type VersionCheckedMigrateToV5<T, I> = frame_support::migrations::VersionedMigration<
pub type MigrateToV5<T, I> = frame_support::migrations::VersionedMigration<
4,
5,
VersionUncheckedMigrateToV5<T, I>,
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/collective/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,7 @@ fn migration_v5() {
v5::old::Voting::<Test, ()>::insert(proposal_hash, vote.clone());

// Run migration.
assert_ok!(v5::VersionCheckedMigrateToV5::<Test, ()>::try_on_runtime_upgrade(true));
assert_ok!(v5::MigrateToV5::<Test, ()>::try_on_runtime_upgrade(true));

// Check that the vote is present and bounded
assert_eq!(
Expand Down

0 comments on commit 27b91f9

Please sign in to comment.