mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 09:21:05 +00:00
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:
@@ -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(())
|
||||
|
||||
Reference in New Issue
Block a user