Skip to content
Snippets Groups Projects
Unverified Commit 18ad4490 authored by PG Herveou's avatar PG Herveou Committed by GitHub
Browse files

Contracts migration update (#2091)

Restore fix from #2077
parent 9faea380
No related merge requests found
Pipeline #407310 failed with stages
in 45 minutes and 4 seconds
...@@ -312,10 +312,7 @@ impl<T: Config, const TEST_ALL_STEPS: bool> OnRuntimeUpgrade for Migration<T, TE ...@@ -312,10 +312,7 @@ impl<T: Config, const TEST_ALL_STEPS: bool> OnRuntimeUpgrade for Migration<T, TE
let current_version = <Pallet<T>>::current_storage_version(); let current_version = <Pallet<T>>::current_storage_version();
if on_chain_version == current_version { if on_chain_version == current_version {
log::warn!( return Ok(Default::default())
target: LOG_TARGET,
"No upgrade: Please remove this migration from your Migrations tuple"
)
} }
log::debug!( log::debug!(
...@@ -324,9 +321,11 @@ impl<T: Config, const TEST_ALL_STEPS: bool> OnRuntimeUpgrade for Migration<T, TE ...@@ -324,9 +321,11 @@ impl<T: Config, const TEST_ALL_STEPS: bool> OnRuntimeUpgrade for Migration<T, TE
<Pallet<T>>::name(), on_chain_version, current_version <Pallet<T>>::name(), on_chain_version, current_version
); );
if !T::Migrations::is_upgrade_supported(on_chain_version, current_version) { ensure!(
log::warn!(target: LOG_TARGET, "Unsupported upgrade: VERSION_RANGE should be (on-chain storage version + 1, current storage version)") T::Migrations::is_upgrade_supported(on_chain_version, current_version),
} "Unsupported upgrade: VERSION_RANGE should be (on-chain storage version + 1, current storage version)"
);
Ok(Default::default()) Ok(Default::default())
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment