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

Commit aba8bee

Browse files
authored
stop scheduler migration pre/post hooks failing after migration (#7638)
1 parent 53957c4 commit aba8bee

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

runtime/parachains/src/scheduler/migration.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,6 @@ pub mod v1 {
109109
"Scheduled before migration: {}",
110110
v0::Scheduled::<T>::get().len()
111111
);
112-
ensure!(
113-
StorageVersion::get::<Pallet<T>>() == 0,
114-
"Storage version should be less than `1` before the migration",
115-
);
116112

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

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

0 commit comments

Comments
 (0)