mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 17:31:03 +00:00
Custom Slots Migration for Fund Index Change (#5227)
* new migration * use new migration in runtime
This commit is contained in:
@@ -1086,7 +1086,7 @@ pub type Executive = frame_executive::Executive<
|
||||
Runtime,
|
||||
AllPalletsWithSystem,
|
||||
(
|
||||
CrowdloanIndexMigration,
|
||||
SlotsCrowdloanIndexMigration,
|
||||
pallet_staking::migrations::v9::InjectValidatorsIntoVoterList<Runtime>,
|
||||
),
|
||||
>;
|
||||
@@ -1094,20 +1094,20 @@ pub type Executive = frame_executive::Executive<
|
||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
||||
|
||||
// Migration for crowdloan pallet to use fund index for account generation.
|
||||
pub struct CrowdloanIndexMigration;
|
||||
impl OnRuntimeUpgrade for CrowdloanIndexMigration {
|
||||
pub struct SlotsCrowdloanIndexMigration;
|
||||
impl OnRuntimeUpgrade for SlotsCrowdloanIndexMigration {
|
||||
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
||||
crowdloan::migration::crowdloan_index_migration::migrate::<Runtime>()
|
||||
slots::migration::slots_crowdloan_index_migration::migrate::<Runtime>()
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn pre_upgrade() -> Result<(), &'static str> {
|
||||
crowdloan::migration::crowdloan_index_migration::pre_migrate::<Runtime>()
|
||||
slots::migration::slots_crowdloan_index_migration::pre_migrate::<Runtime>()
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade() -> Result<(), &'static str> {
|
||||
crowdloan::migration::crowdloan_index_migration::post_migrate::<Runtime>()
|
||||
slots::migration::slots_crowdloan_index_migration::post_migrate::<Runtime>()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user