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

scheduler migration minor fixes #7638

Merged
merged 1 commit into from
Aug 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions runtime/parachains/src/scheduler/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ pub mod v1 {
"Scheduled before migration: {}",
v0::Scheduled::<T>::get().len()
);
ensure!(
StorageVersion::get::<Pallet<T>>() == 0,
"Storage version should be less than `1` before the migration",
);

let bytes = u32::to_be_bytes(v0::Scheduled::<T>::get().len() as u32);

Expand All @@ -123,8 +119,8 @@ pub mod v1 {
fn post_upgrade(state: Vec<u8>) -> Result<(), sp_runtime::DispatchError> {
log::trace!(target: crate::scheduler::LOG_TARGET, "Running post_upgrade()");
ensure!(
StorageVersion::get::<Pallet<T>>() == 1,
"Storage version should be `1` after the migration"
StorageVersion::get::<Pallet<T>>() >= 1,
"Storage version should be at least `1` after the migration"
);
ensure!(
v0::Scheduled::<T>::get().len() == 0,
Expand Down