From bbc5c9f3f238df5e772913ffb56ce8da50bd2882 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 18 Aug 2023 16:43:00 +0700 Subject: [PATCH] stop scheduler migration pre/post hooks failing after migration --- runtime/parachains/src/scheduler/migration.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/runtime/parachains/src/scheduler/migration.rs b/runtime/parachains/src/scheduler/migration.rs index 4284b979264b..32ac9deaf68f 100644 --- a/runtime/parachains/src/scheduler/migration.rs +++ b/runtime/parachains/src/scheduler/migration.rs @@ -109,10 +109,6 @@ pub mod v1 { "Scheduled before migration: {}", v0::Scheduled::::get().len() ); - ensure!( - StorageVersion::get::>() == 0, - "Storage version should be less than `1` before the migration", - ); let bytes = u32::to_be_bytes(v0::Scheduled::::get().len() as u32); @@ -123,8 +119,8 @@ pub mod v1 { fn post_upgrade(state: Vec) -> Result<(), sp_runtime::DispatchError> { log::trace!(target: crate::scheduler::LOG_TARGET, "Running post_upgrade()"); ensure!( - StorageVersion::get::>() == 1, - "Storage version should be `1` after the migration" + StorageVersion::get::>() >= 1, + "Storage version should be at least `1` after the migration" ); ensure!( v0::Scheduled::::get().len() == 0,