CI: Disable runtime upgrade spec name check on Westend Asset Hub and fix Staking pallet migration (#2447)

Westend Asset Hub currently failing because the spec name is being
changed next runtime upgrade
(https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4413125).

This also fixes an idempotency issue with a staking pallet migration.
Similar issues will be caught automatically now that we've also updated
to try-runtime-cli v0.5.0 which checks for idempotency issues.

This also enables try-state checks running in the CI.
This commit is contained in:
Liam Aharon authored and GitHub committed 2023-11-23 14:52:06 +01:00
1 parent 2d09e83d07
commit 12062f6a3a
2 files changed
+8 -17

No files matched your search

+1 -11
View File
@@ -81,20 +81,10 @@ pub mod v14 {
}
}
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<Vec<u8>, TryRuntimeError> {
frame_support::ensure!(
Pallet::<T>::on_chain_storage_version() == 13,
"Required v13 before upgrading to v14."
);
Ok(Default::default())
}
#[cfg(feature = "try-runtime")]
fn post_upgrade(_state: Vec<u8>) -> Result<(), TryRuntimeError> {
frame_support::ensure!(
Pallet::<T>::on_chain_storage_version() == 14,
Pallet::<T>::on_chain_storage_version() >= 14,
"v14 not applied"
);
Ok(())