Skip to content

Commit 52022d9

Browse files
chore: remove unneccessary assert in migration (#2963)
* chore: remove unneccessary assert in migration * fix clippy --------- Co-authored-by: Kailai Wang <Kailai.Wang@hotmail.com>
1 parent 050c7c9 commit 52022d9

File tree

6 files changed

+6
-36
lines changed

6 files changed

+6
-36
lines changed

runtime/litentry/src/migration/migrate_identity.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,7 @@ where
192192
}
193193

194194
fn on_runtime_upgrade() -> frame_support::weights::Weight {
195-
let mut weight = frame_support::weights::Weight::from_parts(0, 0);
196-
// pallet_identity
197-
weight += Self::check_identityof_storage();
198-
weight += Self::check_subsof_storage();
199-
weight += Self::check_registrars_storage();
200-
201-
weight
195+
frame_support::weights::Weight::zero()
202196
}
203197

204198
#[cfg(feature = "try-runtime")]

runtime/litentry/src/migration/migrate_multisig.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,7 @@ where
7676
}
7777

7878
fn on_runtime_upgrade() -> frame_support::weights::Weight {
79-
let mut weight = frame_support::weights::Weight::from_parts(0, 0);
80-
// pallet_multisig
81-
weight += Self::check_multisig_multisigs_storage();
82-
83-
weight
79+
frame_support::weights::Weight::zero()
8480
}
8581

8682
#[cfg(feature = "try-runtime")]

runtime/litmus/src/migration/migrate_identity.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,7 @@ where
192192
}
193193

194194
fn on_runtime_upgrade() -> frame_support::weights::Weight {
195-
let mut weight = frame_support::weights::Weight::from_parts(0, 0);
196-
// pallet_identity
197-
weight += Self::check_identityof_storage();
198-
weight += Self::check_subsof_storage();
199-
weight += Self::check_registrars_storage();
200-
201-
weight
195+
frame_support::weights::Weight::zero()
202196
}
203197

204198
#[cfg(feature = "try-runtime")]

runtime/litmus/src/migration/migrate_multisig.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,7 @@ where
7676
}
7777

7878
fn on_runtime_upgrade() -> frame_support::weights::Weight {
79-
let mut weight = frame_support::weights::Weight::from_parts(0, 0);
80-
// pallet_multisig
81-
weight += Self::check_multisig_multisigs_storage();
82-
83-
weight
79+
frame_support::weights::Weight::zero()
8480
}
8581

8682
#[cfg(feature = "try-runtime")]

runtime/rococo/src/migration/migrate_identity.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,7 @@ where
192192
}
193193

194194
fn on_runtime_upgrade() -> frame_support::weights::Weight {
195-
let mut weight = frame_support::weights::Weight::from_parts(0, 0);
196-
// pallet_identity
197-
weight += Self::check_identityof_storage();
198-
weight += Self::check_subsof_storage();
199-
weight += Self::check_registrars_storage();
200-
201-
weight
195+
frame_support::weights::Weight::zero()
202196
}
203197

204198
#[cfg(feature = "try-runtime")]

runtime/rococo/src/migration/migrate_multisig.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,7 @@ where
7676
}
7777

7878
fn on_runtime_upgrade() -> frame_support::weights::Weight {
79-
let mut weight = frame_support::weights::Weight::from_parts(0, 0);
80-
// pallet_multisig
81-
weight += Self::check_multisig_multisigs_storage();
82-
83-
weight
79+
frame_support::weights::Weight::zero()
8480
}
8581

8682
#[cfg(feature = "try-runtime")]

0 commit comments

Comments
 (0)