Skip to content

Commit

Permalink
Migration checks match expected state after upgrade (#845)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonsso authored Mar 27, 2024
1 parent e542b2b commit 4ace8a7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions runtimes/eden/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,18 @@ where
StorageVersion::get::<pallet_uniques::Pallet<T>>() == 0,
TryRuntimeError::Other("pallet_uniques storage version is not 0")
);
ensure!(
StorageVersion::get::<pallet_identity::Pallet<T>>() == 0,
TryRuntimeError::Other("pallet_identity storage version is not 0")
);

Ok(vec![])
}

#[cfg(feature = "try-runtime")]
fn post_upgrade(_state: Vec<u8>) -> Result<(), TryRuntimeError> {
log::info!("Post upgrade {_state:?}");
use frame_support::ensure;

log::info!("Post upgrade {_state:?}");
ensure!(
StorageVersion::get::<pallet_uniques::Pallet<T>>() == 1,
TryRuntimeError::Other("pallet_uniques post upgrade storage version is not 1")
);
Ok(())
}
}

0 comments on commit 4ace8a7

Please sign in to comment.