Skip to content

Commit

Permalink
Remove migrations (#2681)
Browse files Browse the repository at this point in the history
* remove migrations

* add EnsureStateDecodes

* fix clippy
  • Loading branch information
zjb0807 authored Dec 21, 2023
1 parent f59e1e1 commit 878819c
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 221 deletions.
1 change: 0 additions & 1 deletion modules/homa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ use sp_std::{cmp::Ordering, convert::From, prelude::*, vec, vec::Vec};
pub use module::*;
pub use weights::WeightInfo;

pub mod migrations;
mod mock;
mod tests;
pub mod weights;
Expand Down
22 changes: 0 additions & 22 deletions modules/homa/src/migrations/mod.rs

This file was deleted.

68 changes: 0 additions & 68 deletions modules/homa/src/migrations/v1.rs

This file was deleted.

1 change: 0 additions & 1 deletion modules/session-manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ use sp_runtime::{
};
use sp_staking::SessionIndex;

pub mod migrations;
mod mock;
mod tests;
pub mod weights;
Expand Down
55 changes: 0 additions & 55 deletions modules/session-manager/src/migrations.rs

This file was deleted.

1 change: 0 additions & 1 deletion modules/transaction-pause/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ use sp_core::H160;
use sp_runtime::DispatchResult;
use sp_std::{prelude::*, vec::Vec};

pub mod migrations;
mod mock;
mod tests;
pub mod weights;
Expand Down
54 changes: 0 additions & 54 deletions modules/transaction-pause/src/migrations.rs

This file was deleted.

13 changes: 11 additions & 2 deletions runtime/acala/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1889,8 +1889,17 @@ pub type SignedPayload = generic::SignedPayload<RuntimeCall, SignedExtra>;
/// Extrinsic type that has already been checked.
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
/// Executive: handles dispatch to the various modules.
pub type Executive =
frame_executive::Executive<Runtime, Block, frame_system::ChainContext<Runtime>, Runtime, AllPalletsWithSystem, ()>;
pub type Executive = frame_executive::Executive<
Runtime,
Block,
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
Migrations,
>;

#[allow(unused_parens)]
type Migrations = ();

#[cfg(feature = "runtime-benchmarks")]
#[macro_use]
Expand Down
27 changes: 12 additions & 15 deletions runtime/karura/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ use frame_support::{
tokens::{PayFromAccount, UnityAssetBalanceConversion},
ConstBool, ConstU128, ConstU32, Contains, ContainsLengthBound, Currency as PalletCurrency, Currency,
EnsureOrigin, EqualPrivilegeOnly, Get, Imbalance, InstanceFilter, LinearStoragePrice, LockIdentifier,
OnRuntimeUpgrade, OnUnbalanced, SortedMembers,
OnUnbalanced, SortedMembers,
},
weights::{constants::RocksDbWeight, ConstantMultiplier, Weight},
PalletId,
Expand Down Expand Up @@ -1893,20 +1893,17 @@ pub type SignedPayload = generic::SignedPayload<RuntimeCall, SignedExtra>;
/// Extrinsic type that has already been checked.
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
/// Executive: handles dispatch to the various modules.
pub type Executive =
frame_executive::Executive<Runtime, Block, frame_system::ChainContext<Runtime>, Runtime, AllPalletsWithSystem, ()>;

pub struct MigrateSetXcmVersionForKusama;
impl OnRuntimeUpgrade for MigrateSetXcmVersionForKusama {
fn on_runtime_upgrade() -> Weight {
let _ = PolkadotXcm::force_xcm_version(
RuntimeOrigin::root(),
Box::new(MultiLocation::new(1, Junctions::Here)),
3,
);
RocksDbWeight::get().writes(1)
}
}
pub type Executive = frame_executive::Executive<
Runtime,
Block,
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
Migrations,
>;

#[allow(unused_parens)]
type Migrations = ();

#[cfg(feature = "runtime-benchmarks")]
#[macro_use]
Expand Down
13 changes: 11 additions & 2 deletions runtime/mandala/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1974,8 +1974,17 @@ pub type SignedPayload = generic::SignedPayload<RuntimeCall, SignedExtra>;
/// Extrinsic type that has already been checked.
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
/// Executive: handles dispatch to the various modules.
pub type Executive =
frame_executive::Executive<Runtime, Block, frame_system::ChainContext<Runtime>, Runtime, AllPalletsWithSystem, ()>;
pub type Executive = frame_executive::Executive<
Runtime,
Block,
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
Migrations,
>;

#[allow(unused_parens)]
type Migrations = ();

construct_runtime!(
pub enum Runtime {
Expand Down

0 comments on commit 878819c

Please sign in to comment.