Remove already triggered migrations (#2764)

* Remove BabeEpochConfigMigrations

* Remove remaining migrations

* Remove unused migration definitions
This commit is contained in:
Ashley
2021-04-12 13:29:52 +02:00
committed by GitHub
parent 2d21599ec5
commit 195772c5d4
3 changed files with 3 additions and 94 deletions
+1 -26
View File
@@ -1036,18 +1036,6 @@ impl pallet_babe::migrations::BabePalletPrefix for Runtime {
}
}
pub struct BabeEpochConfigMigrations;
impl frame_support::traits::OnRuntimeUpgrade for BabeEpochConfigMigrations {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
pallet_babe::migrations::add_epoch_configuration::<Runtime>(
babe_primitives::BabeEpochConfiguration {
allowed_slots: babe_primitives::AllowedSlots::PrimaryAndSecondaryPlainSlots,
..BABE_GENESIS_EPOCH_CONFIG
}
)
}
}
/// The address format for describing accounts.
pub type Address = sp_runtime::MultiAddress<AccountId, ()>;
/// Block header type as expected by this runtime.
@@ -1079,24 +1067,11 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPallets,
(BabeEpochConfigMigrations, KillOffchainPhragmenStorageTest),
(),
>;
/// The payload being signed in the transactions.
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
/// This is only for testing. The main migration is inside staking's `on_runtime_upgrade`.
pub struct KillOffchainPhragmenStorageTest;
impl frame_support::traits::OnRuntimeUpgrade for KillOffchainPhragmenStorageTest {
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
pallet_staking::migrations::v6::pre_migrate::<Runtime>()
}
fn on_runtime_upgrade() -> frame_support::weights::Weight {
0
}
}
#[cfg(not(feature = "disable-runtime-api"))]
sp_api::impl_runtime_apis! {
impl sp_api::Core<Block> for Runtime {