remove stale migrations (#1914)

This commit is contained in:
s3krit
2020-11-03 20:26:31 +01:00
committed by GitHub
parent 04da99de58
commit 033f208d34
2 changed files with 2 additions and 56 deletions
+1 -28
View File
@@ -890,34 +890,7 @@ impl pallet_proxy::Trait for Runtime {
pub struct CustomOnRuntimeUpgrade;
impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
// Update scheduler origin usage
#[derive(Encode, Decode)]
#[allow(non_camel_case_types)]
pub enum OldOriginCaller {
system(frame_system::Origin<Runtime>),
pallet_collective_Instance1(
pallet_collective::Origin<Runtime, pallet_collective::Instance1>
),
pallet_collective_Instance2(
pallet_collective::Origin<Runtime, pallet_collective::Instance2>
),
}
impl Into<OriginCaller> for OldOriginCaller {
fn into(self) -> OriginCaller {
match self {
OldOriginCaller::system(o) => OriginCaller::system(o),
OldOriginCaller::pallet_collective_Instance1(o) =>
OriginCaller::pallet_collective_Instance1(o),
OldOriginCaller::pallet_collective_Instance2(o) =>
OriginCaller::pallet_collective_Instance2(o),
}
}
}
pallet_scheduler::Module::<Runtime>::migrate_origin::<OldOriginCaller>();
<Runtime as frame_system::Trait>::MaximumBlockWeight::get()
0
}
}