Skip to content

Commit 5966ba8

Browse files
authored
Remove migration in runtime 293 (#369)
* Remove migration in runtime 293 * Remove migration_upgrade_weight_struct in benchmarking * Remove unused import in xcm_config.rs
1 parent b830114 commit 5966ba8

File tree

9 files changed

+5
-326
lines changed

9 files changed

+5
-326
lines changed

pallets/automation-time/src/benchmarking.rs

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -567,35 +567,6 @@ benchmarks! {
567567
schedule_notify_tasks::<T>(caller.clone(), vec![new_time_slot], T::MaxTasksPerSlot::get());
568568
}: { AutomationTime::<T>::shift_missed_tasks(last_time_slot, diff) }
569569

570-
migration_upgrade_weight_struct {
571-
let v in 1..100;
572-
573-
use migrations::upgrade_weight_struct::{AccountTasks as OldAccountTasks, UpgradeWeightStruct, OldAction, OldTask};
574-
use frame_support::traits::OnRuntimeUpgrade;
575-
576-
for i in 0..v {
577-
let account_id: T::AccountId = account("Account", 0, i);
578-
let task_id = Pallet::<T>::generate_task_id(account_id.clone(), vec![0]);
579-
let task = OldTask::<T> {
580-
owner_id: account_id.clone(),
581-
provided_id: vec![1],
582-
schedule: Schedule::Fixed {
583-
execution_times: vec![10].try_into().unwrap(),
584-
executions_left: 1,
585-
},
586-
action: OldAction::<T>::AutoCompoundDelegatedStake {
587-
delegator: account_id.clone(),
588-
collator: account_id.clone(),
589-
account_minimum: 100u32.into(),
590-
},
591-
};
592-
OldAccountTasks::<T>::insert(account_id.clone(), task_id, task);
593-
}
594-
}: { UpgradeWeightStruct::<T>::on_runtime_upgrade() }
595-
verify {
596-
assert_eq!(v, crate::AccountTasks::<T>::iter().count() as u32);
597-
}
598-
599570
impl_benchmark_test_suite!(
600571
AutomationTime,
601572
crate::mock::new_test_ext(crate::tests::START_BLOCK_TIME),
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
// Migrations
2-
3-
pub mod upgrade_weight_struct;

pallets/automation-time/src/migrations/upgrade_weight_struct.rs

Lines changed: 0 additions & 199 deletions
This file was deleted.
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
// Migrations
2-
3-
pub mod upgrade_weight_struct;

pallets/xcmp-handler/src/migrations/upgrade_weight_struct.rs

Lines changed: 0 additions & 82 deletions
This file was deleted.

runtime/neumann/src/xcm_config.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ use super::{
44
UnknownTokens, XcmpQueue, MAXIMUM_BLOCK_WEIGHT, NATIVE_TOKEN_ID,
55
};
66

7-
use core::marker::PhantomData;
87
use frame_support::{
9-
log, match_types, parameter_types,
8+
match_types, parameter_types,
109
traits::{ConstU32, Everything, Nothing},
1110
};
1211
use frame_system::EnsureRoot;
@@ -25,7 +24,7 @@ use xcm_builder::{
2524
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeRevenue,
2625
TakeWeightCredit, WithComputedOrigin,
2726
};
28-
use xcm_executor::{traits::ShouldExecute, Config, XcmExecutor};
27+
use xcm_executor::{Config, XcmExecutor};
2928

3029
// ORML imports
3130
use orml_asset_registry::{AssetRegistryTrader, FixedRateAssetRegistryTrader};

runtime/oak/src/xcm_config.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use super::{
55
MAXIMUM_BLOCK_WEIGHT, NATIVE_TOKEN_ID,
66
};
77

8-
use core::marker::PhantomData;
98
use frame_support::{
109
match_types, parameter_types,
1110
traits::{ConstU32, Everything, Nothing},
@@ -27,7 +26,7 @@ use xcm_builder::{
2726
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeRevenue,
2827
TakeWeightCredit, WithComputedOrigin,
2928
};
30-
use xcm_executor::{traits::ShouldExecute, Config, XcmExecutor};
29+
use xcm_executor::{Config, XcmExecutor};
3130

3231
// ORML imports
3332
use orml_asset_registry::{AssetRegistryTrader, FixedRateAssetRegistryTrader};

runtime/turing/src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,7 @@ pub type Executive = frame_executive::Executive<
145145

146146
// All migrations executed on runtime upgrade as a nested tuple of types implementing
147147
// `OnRuntimeUpgrade`.
148-
type Migrations = (
149-
pallet_parachain_staking::migrations::MigrateAtStakeAutoCompound<Runtime>,
150-
pallet_xcmp_handler::migrations::upgrade_weight_struct::UpgradeWeightStruct<Runtime>,
151-
pallet_automation_time::migrations::upgrade_weight_struct::UpgradeWeightStruct<Runtime>,
152-
);
148+
type Migrations = ();
153149

154150
/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know
155151
/// the specifics of the runtime. They can then be made to be agnostic over specific formats

runtime/turing/src/xcm_config.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use super::{
55
MAXIMUM_BLOCK_WEIGHT, NATIVE_TOKEN_ID,
66
};
77

8-
use core::marker::PhantomData;
98
use frame_support::{
109
match_types, parameter_types,
1110
traits::{ConstU32, Everything, Nothing},
@@ -26,7 +25,7 @@ use xcm_builder::{
2625
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeRevenue,
2726
TakeWeightCredit, WithComputedOrigin,
2827
};
29-
use xcm_executor::{traits::ShouldExecute, Config, XcmExecutor};
28+
use xcm_executor::{Config, XcmExecutor};
3029

3130
// ORML imports
3231
use orml_asset_registry::{AssetRegistryTrader, FixedRateAssetRegistryTrader};

0 commit comments

Comments
 (0)