Skip to content

Commit

Permalink
Add some more migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardo-xxnet committed Feb 24, 2023
1 parent 4504e15 commit b89175e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions runtime/xxnetwork/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,10 @@ pub type Executive = frame_executive::Executive<
Migrations,
>;

parameter_types! {
pub const InactiveAccounts: Vec<AccountId> = Vec::new();
}

pub type Migrations = (
pallet_staking::migrations::v10::MigrateFromV7dot5ToV10<Runtime>,
pallet_staking::migrations::v11::MigrateToV11<
Expand All @@ -1181,6 +1185,13 @@ pub type Migrations = (
pallet_democracy::migrations::v1::Migration<Runtime>,
pallet_multisig::migrations::v1::MigrateToV1<Runtime>,
pallet_election_provider_multi_phase::migrations::v1::MigrateToV1<Runtime>,
pallet_assets::migration::v1::MigrateToV1<Runtime>,
pallet_balances::migration::MigrateManyToTrackInactive<Runtime, InactiveAccounts>,
// Remove stale entries in the set id -> session index storage map (after
// this release they will be properly pruned after the bonding duration has
// elapsed)
pallet_grandpa::migrations::CleanupSetIdSessionMap<Runtime>,
UniquesMigration,
);

pub struct StakingMigrationV11OldPallet;
Expand All @@ -1199,6 +1210,15 @@ impl OnRuntimeUpgrade for SchedulerMigrationV2ToV4 {
}
}

// Uniques pallet migration
pub struct UniquesMigration;

impl OnRuntimeUpgrade for UniquesMigration {
fn on_runtime_upgrade() -> Weight {
pallet_uniques::migration::migrate_to_v1::<Runtime, (), Uniques>()
}
}

#[cfg(feature = "runtime-benchmarks")]
#[macro_use]
extern crate frame_benchmarking;
Expand Down

0 comments on commit b89175e

Please sign in to comment.