mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 18:07:58 +00:00
Fix para-scheduler migration on Rococo (#1921)
Closes https://github.com/paritytech/polkadot-sdk/issues/1916 Changes: - Trivially wrap the migration into a version migration to enforce idempotency. - Opinionated logging nits @liamaharon maybe we can add a check to the `try-runtime-cli` that migrations are idempotent? It should be possible to check that the storage root is identical after executing a second time (and that it does not panic like it did here 😆). --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
This commit is contained in:
committed by
GitHub
parent
38c0604b46
commit
58b7927284
@@ -119,7 +119,7 @@ impl<
|
||||
let on_chain_version = Pallet::on_chain_storage_version();
|
||||
if on_chain_version == FROM {
|
||||
log::info!(
|
||||
"Running {} VersionedOnRuntimeUpgrade: version {:?} to {:?}.",
|
||||
"🚚 Pallet {:?} migrating storage version from {:?} to {:?}.",
|
||||
Pallet::name(),
|
||||
FROM,
|
||||
TO
|
||||
@@ -134,9 +134,10 @@ impl<
|
||||
weight.saturating_add(DbWeight::get().reads_writes(1, 1))
|
||||
} else {
|
||||
log::warn!(
|
||||
"{} VersionedOnRuntimeUpgrade for version {:?} skipped because current on-chain version is {:?}.",
|
||||
"🚚 Pallet {:?} migration {}->{} can be removed; on-chain is already at {:?}.",
|
||||
Pallet::name(),
|
||||
FROM,
|
||||
TO,
|
||||
on_chain_version
|
||||
);
|
||||
DbWeight::get().reads(1)
|
||||
|
||||
Reference in New Issue
Block a user