mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 02:51:08 +00:00
Rococo rm uneeded migrations, as network reset to "2.1" (#5115)
* rm uneeded migrations, rococo reset to "2.1" * rm unimplimented generics README update * rm unused imports * Randomness rm
This commit is contained in:
@@ -24,7 +24,7 @@ use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
|
||||
use beefy_primitives::{crypto::AuthorityId as BeefyId, mmr::MmrLeafVersion};
|
||||
use frame_support::{
|
||||
construct_runtime, parameter_types,
|
||||
traits::{Contains, InstanceFilter, KeyOwnerProofSystem, OnRuntimeUpgrade},
|
||||
traits::{Contains, InstanceFilter, KeyOwnerProofSystem},
|
||||
PalletId,
|
||||
};
|
||||
use frame_system::EnsureRoot;
|
||||
@@ -148,50 +148,10 @@ pub type Executive = frame_executive::Executive<
|
||||
frame_system::ChainContext<Runtime>,
|
||||
Runtime,
|
||||
AllPalletsWithSystem,
|
||||
(SessionHistoricalModulePrefixMigration, CrowdloanIndexMigration),
|
||||
>;
|
||||
/// The payload being signed in transactions.
|
||||
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 {
|
||||
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
||||
crowdloan::migration::crowdloan_index_migration::migrate::<Runtime>()
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn pre_upgrade() -> Result<(), &'static str> {
|
||||
crowdloan::migration::crowdloan_index_migration::pre_migrate::<Runtime>()
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade() -> Result<(), &'static str> {
|
||||
crowdloan::migration::crowdloan_index_migration::post_migrate::<Runtime>()
|
||||
}
|
||||
}
|
||||
|
||||
/// Migrate session-historical from `Session` to the new pallet prefix `Historical`
|
||||
pub struct SessionHistoricalModulePrefixMigration;
|
||||
|
||||
impl OnRuntimeUpgrade for SessionHistoricalModulePrefixMigration {
|
||||
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(())
|
||||
}
|
||||
}
|
||||
|
||||
impl_opaque_keys! {
|
||||
pub struct SessionKeys {
|
||||
pub grandpa: Grandpa,
|
||||
|
||||
Reference in New Issue
Block a user