Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Add a weight for StorageVersion write
Browse files Browse the repository at this point in the history
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
  • Loading branch information
slumber and bkchr committed Sep 17, 2021
1 parent 107c3d0 commit d3772b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pallets/parachain-system/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ pub fn on_runtime_upgrade<T: Config>() -> Weight {
let mut weight: Weight = 0;

if StorageVersion::get::<Pallet<T>>() == 0 {
weight = weight.saturating_add(v1::migrate::<T>());
weight = weight
.saturating_add(v1::migrate::<T>())
.saturating_add(T::DbWeight::get().writes(1));
StorageVersion::new(1).put::<Pallet<T>>();
}

Expand Down

0 comments on commit d3772b6

Please sign in to comment.