mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 11:41:04 +00:00
* Remove SlotsCrowdloanIndexMigration * Remove slots index migration code * Remove crowdloan index migration code * remove reference to migration * rustfmt * westend: remove unused import OnRuntimeUpgrade * kusama: remove unused import OnRuntimeUpgrade * polkadot: remove unused import OnRuntimeUpgrade * Revert "Remove crowdloan index migration code" This reverts commit fe84b59e3133e950740d911fb019e6002f60d5a3. * Revert "Remove slots index migration code" This reverts commit 62c5a28e21d2949189bdb52835cc3a44f6e9c561. * Revert "remove reference to migration" This reverts commit 1f8806c010210b638cc59979ab873619910596c0. * Remove InjectValidatorsIntoVoterList migration
This commit is contained in:
@@ -52,8 +52,7 @@ use frame_election_provider_support::{
|
|||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, parameter_types,
|
construct_runtime, parameter_types,
|
||||||
traits::{
|
traits::{
|
||||||
Contains, EnsureOneOf, InstanceFilter, KeyOwnerProofSystem, LockIdentifier,
|
Contains, EnsureOneOf, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, PrivilegeCmp,
|
||||||
OnRuntimeUpgrade, PrivilegeCmp,
|
|
||||||
},
|
},
|
||||||
weights::ConstantMultiplier,
|
weights::ConstantMultiplier,
|
||||||
PalletId, RuntimeDebug,
|
PalletId, RuntimeDebug,
|
||||||
@@ -1536,31 +1535,11 @@ pub type Executive = frame_executive::Executive<
|
|||||||
frame_system::ChainContext<Runtime>,
|
frame_system::ChainContext<Runtime>,
|
||||||
Runtime,
|
Runtime,
|
||||||
AllPalletsWithSystem,
|
AllPalletsWithSystem,
|
||||||
(
|
(),
|
||||||
SlotsCrowdloanIndexMigration,
|
|
||||||
pallet_staking::migrations::v9::InjectValidatorsIntoVoterList<Runtime>,
|
|
||||||
),
|
|
||||||
>;
|
>;
|
||||||
/// The payload being signed in the transactions.
|
/// The payload being signed in the transactions.
|
||||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
||||||
|
|
||||||
pub struct SlotsCrowdloanIndexMigration;
|
|
||||||
impl OnRuntimeUpgrade for SlotsCrowdloanIndexMigration {
|
|
||||||
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
|
||||||
slots::migration::slots_crowdloan_index_migration::migrate::<Runtime>()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "try-runtime")]
|
|
||||||
fn pre_upgrade() -> Result<(), &'static str> {
|
|
||||||
slots::migration::slots_crowdloan_index_migration::pre_migrate::<Runtime>()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "try-runtime")]
|
|
||||||
fn post_upgrade() -> Result<(), &'static str> {
|
|
||||||
slots::migration::slots_crowdloan_index_migration::post_migrate::<Runtime>()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "runtime-benchmarks")]
|
#[cfg(feature = "runtime-benchmarks")]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate frame_benchmarking;
|
extern crate frame_benchmarking;
|
||||||
|
|||||||
@@ -41,8 +41,7 @@ use frame_election_provider_support::{generate_solution_type, onchain, Sequentia
|
|||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, parameter_types,
|
construct_runtime, parameter_types,
|
||||||
traits::{
|
traits::{
|
||||||
Contains, EnsureOneOf, InstanceFilter, KeyOwnerProofSystem, LockIdentifier,
|
Contains, EnsureOneOf, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, PrivilegeCmp,
|
||||||
OnRuntimeUpgrade, PrivilegeCmp,
|
|
||||||
},
|
},
|
||||||
weights::ConstantMultiplier,
|
weights::ConstantMultiplier,
|
||||||
PalletId, RuntimeDebug,
|
PalletId, RuntimeDebug,
|
||||||
@@ -1489,32 +1488,11 @@ pub type Executive = frame_executive::Executive<
|
|||||||
frame_system::ChainContext<Runtime>,
|
frame_system::ChainContext<Runtime>,
|
||||||
Runtime,
|
Runtime,
|
||||||
AllPalletsWithSystem,
|
AllPalletsWithSystem,
|
||||||
(
|
(),
|
||||||
SlotsCrowdloanIndexMigration,
|
|
||||||
pallet_staking::migrations::v9::InjectValidatorsIntoVoterList<Runtime>,
|
|
||||||
),
|
|
||||||
>;
|
>;
|
||||||
/// 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>;
|
||||||
|
|
||||||
// Migration for crowdloan pallet to use fund index for account generation.
|
|
||||||
pub struct SlotsCrowdloanIndexMigration;
|
|
||||||
impl OnRuntimeUpgrade for SlotsCrowdloanIndexMigration {
|
|
||||||
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
|
||||||
slots::migration::slots_crowdloan_index_migration::migrate::<Runtime>()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "try-runtime")]
|
|
||||||
fn pre_upgrade() -> Result<(), &'static str> {
|
|
||||||
slots::migration::slots_crowdloan_index_migration::pre_migrate::<Runtime>()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "try-runtime")]
|
|
||||||
fn post_upgrade() -> Result<(), &'static str> {
|
|
||||||
slots::migration::slots_crowdloan_index_migration::post_migrate::<Runtime>()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "runtime-benchmarks")]
|
#[cfg(feature = "runtime-benchmarks")]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate frame_benchmarking;
|
extern crate frame_benchmarking;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ use beefy_primitives::crypto::AuthorityId as BeefyId;
|
|||||||
use frame_election_provider_support::{onchain, SequentialPhragmen};
|
use frame_election_provider_support::{onchain, SequentialPhragmen};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, parameter_types,
|
construct_runtime, parameter_types,
|
||||||
traits::{Contains, InstanceFilter, KeyOwnerProofSystem, OnRuntimeUpgrade},
|
traits::{Contains, InstanceFilter, KeyOwnerProofSystem},
|
||||||
weights::ConstantMultiplier,
|
weights::ConstantMultiplier,
|
||||||
PalletId,
|
PalletId,
|
||||||
};
|
};
|
||||||
@@ -1098,32 +1098,11 @@ pub type Executive = frame_executive::Executive<
|
|||||||
frame_system::ChainContext<Runtime>,
|
frame_system::ChainContext<Runtime>,
|
||||||
Runtime,
|
Runtime,
|
||||||
AllPalletsWithSystem,
|
AllPalletsWithSystem,
|
||||||
(
|
(),
|
||||||
SlotsCrowdloanIndexMigration,
|
|
||||||
pallet_staking::migrations::v9::InjectValidatorsIntoVoterList<Runtime>,
|
|
||||||
),
|
|
||||||
>;
|
>;
|
||||||
/// 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>;
|
||||||
|
|
||||||
// Migration for crowdloan pallet to use fund index for account generation.
|
|
||||||
pub struct SlotsCrowdloanIndexMigration;
|
|
||||||
impl OnRuntimeUpgrade for SlotsCrowdloanIndexMigration {
|
|
||||||
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
|
||||||
slots::migration::slots_crowdloan_index_migration::migrate::<Runtime>()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "try-runtime")]
|
|
||||||
fn pre_upgrade() -> Result<(), &'static str> {
|
|
||||||
slots::migration::slots_crowdloan_index_migration::pre_migrate::<Runtime>()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "try-runtime")]
|
|
||||||
fn post_upgrade() -> Result<(), &'static str> {
|
|
||||||
slots::migration::slots_crowdloan_index_migration::post_migrate::<Runtime>()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[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