Skip to content

Commit

Permalink
chore: remove unneccessary assert in migration (#2963)
Browse files Browse the repository at this point in the history
* chore: remove unneccessary assert in migration

* fix clippy

---------

Co-authored-by: Kailai Wang <Kailai.Wang@hotmail.com>
  • Loading branch information
wangminqi and Kailai-Wang authored Aug 5, 2024
1 parent 050c7c9 commit 52022d9
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 36 deletions.
8 changes: 1 addition & 7 deletions runtime/litentry/src/migration/migrate_identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,7 @@ where
}

fn on_runtime_upgrade() -> frame_support::weights::Weight {
let mut weight = frame_support::weights::Weight::from_parts(0, 0);
// pallet_identity
weight += Self::check_identityof_storage();
weight += Self::check_subsof_storage();
weight += Self::check_registrars_storage();

weight
frame_support::weights::Weight::zero()
}

#[cfg(feature = "try-runtime")]
Expand Down
6 changes: 1 addition & 5 deletions runtime/litentry/src/migration/migrate_multisig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,7 @@ where
}

fn on_runtime_upgrade() -> frame_support::weights::Weight {
let mut weight = frame_support::weights::Weight::from_parts(0, 0);
// pallet_multisig
weight += Self::check_multisig_multisigs_storage();

weight
frame_support::weights::Weight::zero()
}

#[cfg(feature = "try-runtime")]
Expand Down
8 changes: 1 addition & 7 deletions runtime/litmus/src/migration/migrate_identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,7 @@ where
}

fn on_runtime_upgrade() -> frame_support::weights::Weight {
let mut weight = frame_support::weights::Weight::from_parts(0, 0);
// pallet_identity
weight += Self::check_identityof_storage();
weight += Self::check_subsof_storage();
weight += Self::check_registrars_storage();

weight
frame_support::weights::Weight::zero()
}

#[cfg(feature = "try-runtime")]
Expand Down
6 changes: 1 addition & 5 deletions runtime/litmus/src/migration/migrate_multisig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,7 @@ where
}

fn on_runtime_upgrade() -> frame_support::weights::Weight {
let mut weight = frame_support::weights::Weight::from_parts(0, 0);
// pallet_multisig
weight += Self::check_multisig_multisigs_storage();

weight
frame_support::weights::Weight::zero()
}

#[cfg(feature = "try-runtime")]
Expand Down
8 changes: 1 addition & 7 deletions runtime/rococo/src/migration/migrate_identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,7 @@ where
}

fn on_runtime_upgrade() -> frame_support::weights::Weight {
let mut weight = frame_support::weights::Weight::from_parts(0, 0);
// pallet_identity
weight += Self::check_identityof_storage();
weight += Self::check_subsof_storage();
weight += Self::check_registrars_storage();

weight
frame_support::weights::Weight::zero()
}

#[cfg(feature = "try-runtime")]
Expand Down
6 changes: 1 addition & 5 deletions runtime/rococo/src/migration/migrate_multisig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,7 @@ where
}

fn on_runtime_upgrade() -> frame_support::weights::Weight {
let mut weight = frame_support::weights::Weight::from_parts(0, 0);
// pallet_multisig
weight += Self::check_multisig_multisigs_storage();

weight
frame_support::weights::Weight::zero()
}

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

0 comments on commit 52022d9

Please sign in to comment.