Skip to content

Commit

Permalink
renamed VersionCheckedMigrateToV2 to MigrateToV2 paritytech#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 ecea308 commit 7af51dd
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 55 deletions.
74 changes: 28 additions & 46 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 7 additions & 8 deletions substrate/frame/assets/src/migration/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,10 @@ impl<T: Config<I>, I: 'static, A: Get<Vec<(T::AssetId, T::AccountId)>>> OnRuntim

/// [`VersionUncheckedMigrateToV2`] wrapped in a [`frame_support::migrations::VersionedMigration`],
/// ensuring the migration is only performed when on-chain version is 1.
pub type VersionCheckedMigrateToV2<T, I = (), A = ()> =
frame_support::migrations::VersionedMigration<
1,
2,
VersionUncheckedMigrateToV2<T, I, A>,
crate::pallet::Pallet<T, I>,
<T as frame_system::Config>::DbWeight,
>;
pub type MigrateToV2<T, I = (), A = ()> = frame_support::migrations::VersionedMigration<
1,
2,
VersionUncheckedMigrateToV2<T, I, A>,
crate::pallet::Pallet<T, I>,
<T as frame_system::Config>::DbWeight,
>;
2 changes: 1 addition & 1 deletion substrate/frame/assets/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1841,7 +1841,7 @@ fn migrate_to_v2_works() {
}

// Run migration.
assert_ok!(crate::migration::v2::VersionCheckedMigrateToV2::<
assert_ok!(crate::migration::v2::MigrateToV2::<
Test,
(),
ConstVecForMigrationToV2,
Expand Down

0 comments on commit 7af51dd

Please sign in to comment.