mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 14:01:02 +00:00
Remove stale migrations post 9.16 release (#4848)
* Remove stale migrations post 9.16 release * Remove more * Bring back migration * enact migration * nit * Fix warn * Fix westend * Fix build
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1446,7 +1446,7 @@ pub type Executive = frame_executive::Executive<
|
|||||||
frame_system::ChainContext<Runtime>,
|
frame_system::ChainContext<Runtime>,
|
||||||
Runtime,
|
Runtime,
|
||||||
AllPalletsWithSystem,
|
AllPalletsWithSystem,
|
||||||
(SchedulerMigrationV3, FixCouncilDepositMigration, CrowdloanIndexMigration),
|
(FixCouncilDepositMigration, CrowdloanIndexMigration),
|
||||||
>;
|
>;
|
||||||
/// The payload being signed in transactions.
|
/// The payload being signed in transactions.
|
||||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
||||||
@@ -1473,7 +1473,6 @@ impl OnRuntimeUpgrade for CrowdloanIndexMigration {
|
|||||||
///
|
///
|
||||||
/// See more details here: https://github.com/paritytech/polkadot/issues/4160
|
/// See more details here: https://github.com/paritytech/polkadot/issues/4160
|
||||||
pub struct FixCouncilDepositMigration;
|
pub struct FixCouncilDepositMigration;
|
||||||
|
|
||||||
impl FixCouncilDepositMigration {
|
impl FixCouncilDepositMigration {
|
||||||
fn execute(check: bool) -> frame_support::weights::Weight {
|
fn execute(check: bool) -> frame_support::weights::Weight {
|
||||||
let accounts = vec![
|
let accounts = vec![
|
||||||
@@ -1648,7 +1647,7 @@ impl FixCouncilDepositMigration {
|
|||||||
|
|
||||||
impl OnRuntimeUpgrade for FixCouncilDepositMigration {
|
impl OnRuntimeUpgrade for FixCouncilDepositMigration {
|
||||||
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
||||||
if VERSION.spec_version == 9150 {
|
if VERSION.spec_version == 9180 {
|
||||||
Self::execute(false)
|
Self::execute(false)
|
||||||
} else {
|
} else {
|
||||||
log::warn!(target: "runtime::polkadot", "FixCouncilDepositMigration should be removed.");
|
log::warn!(target: "runtime::polkadot", "FixCouncilDepositMigration should be removed.");
|
||||||
@@ -1663,65 +1662,6 @@ impl OnRuntimeUpgrade for FixCouncilDepositMigration {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Migration for scheduler pallet to move from a plain Call to a CallOrHash.
|
|
||||||
pub struct SchedulerMigrationV3;
|
|
||||||
|
|
||||||
impl OnRuntimeUpgrade for SchedulerMigrationV3 {
|
|
||||||
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
|
||||||
Scheduler::migrate_v2_to_v3()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "try-runtime")]
|
|
||||||
fn pre_upgrade() -> Result<(), &'static str> {
|
|
||||||
Scheduler::pre_migrate_to_v3()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "try-runtime")]
|
|
||||||
fn post_upgrade() -> Result<(), &'static str> {
|
|
||||||
Scheduler::post_migrate_to_v3()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Migration to generate pallet staking's `SortedListProvider` from pre-existing nominators.
|
|
||||||
pub struct StakingBagsListMigrationV8;
|
|
||||||
|
|
||||||
impl OnRuntimeUpgrade for StakingBagsListMigrationV8 {
|
|
||||||
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
|
||||||
pallet_staking::migrations::v8::migrate::<Runtime>()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "try-runtime")]
|
|
||||||
fn pre_upgrade() -> Result<(), &'static str> {
|
|
||||||
pallet_staking::migrations::v8::pre_migrate::<Runtime>()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "try-runtime")]
|
|
||||||
fn post_upgrade() -> Result<(), &'static str> {
|
|
||||||
pallet_staking::migrations::v8::post_migrate::<Runtime>()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Migrate session-historical from `Session` to the new pallet prefix `Historical`
|
|
||||||
pub struct SessionHistoricalPalletPrefixMigration;
|
|
||||||
|
|
||||||
impl OnRuntimeUpgrade for SessionHistoricalPalletPrefixMigration {
|
|
||||||
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
|
||||||
pallet_session::migrations::v1::migrate::<Runtime, Historical>()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "try-runtime")]
|
|
||||||
fn pre_upgrade() -> Result<(), &'static str> {
|
|
||||||
pallet_session::migrations::v1::pre_migrate::<Runtime, Historical>();
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "try-runtime")]
|
|
||||||
fn post_upgrade() -> Result<(), &'static str> {
|
|
||||||
pallet_session::migrations::v1::post_migrate::<Runtime, Historical>();
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "runtime-benchmarks")]
|
#[cfg(feature = "runtime-benchmarks")]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate frame_benchmarking;
|
extern crate frame_benchmarking;
|
||||||
|
|||||||
@@ -1084,7 +1084,7 @@ pub type Executive = frame_executive::Executive<
|
|||||||
frame_system::ChainContext<Runtime>,
|
frame_system::ChainContext<Runtime>,
|
||||||
Runtime,
|
Runtime,
|
||||||
AllPalletsWithSystem,
|
AllPalletsWithSystem,
|
||||||
(SessionHistoricalPalletPrefixMigration, SchedulerMigrationV3, CrowdloanIndexMigration),
|
CrowdloanIndexMigration,
|
||||||
>;
|
>;
|
||||||
/// The payload being signed in transactions.
|
/// The payload being signed in transactions.
|
||||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
||||||
@@ -1107,45 +1107,6 @@ impl OnRuntimeUpgrade for CrowdloanIndexMigration {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Migration for scheduler pallet to move from a plain Call to a CallOrHash.
|
|
||||||
pub struct SchedulerMigrationV3;
|
|
||||||
|
|
||||||
impl OnRuntimeUpgrade for SchedulerMigrationV3 {
|
|
||||||
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
|
||||||
Scheduler::migrate_v2_to_v3()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "try-runtime")]
|
|
||||||
fn pre_upgrade() -> Result<(), &'static str> {
|
|
||||||
Scheduler::pre_migrate_to_v3()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "try-runtime")]
|
|
||||||
fn post_upgrade() -> Result<(), &'static str> {
|
|
||||||
Scheduler::post_migrate_to_v3()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Migrate session-historical from `Session` to the new pallet prefix `Historical`
|
|
||||||
pub struct SessionHistoricalPalletPrefixMigration;
|
|
||||||
|
|
||||||
impl OnRuntimeUpgrade for SessionHistoricalPalletPrefixMigration {
|
|
||||||
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
|
||||||
pallet_session::migrations::v1::migrate::<Runtime, Historical>()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "try-runtime")]
|
|
||||||
fn pre_upgrade() -> Result<(), &'static str> {
|
|
||||||
pallet_session::migrations::v1::pre_migrate::<Runtime, Historical>();
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "try-runtime")]
|
|
||||||
fn post_upgrade() -> Result<(), &'static str> {
|
|
||||||
pallet_session::migrations::v1::post_migrate::<Runtime, Historical>();
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#[cfg(feature = "runtime-benchmarks")]
|
#[cfg(feature = "runtime-benchmarks")]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate frame_benchmarking;
|
extern crate frame_benchmarking;
|
||||||
|
|||||||
Reference in New Issue
Block a user