* Put type constraint at the end

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix rust features

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use new OnRuntimeUpgrade hooks

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use new OnRuntimeUpgrade hooks

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Oliver Tale-Yazdi
2022-09-19 15:12:29 +02:00
committed by GitHub
parent 0d2adf1fa1
commit d4b82c7706
4 changed files with 6 additions and 5 deletions
+3 -3
View File
@@ -34,7 +34,7 @@ pub mod v11 {
for MigrateToV11<T, P, N>
{
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
fn pre_upgrade() -> Result<Vec<u8>, &'static str> {
frame_support::ensure!(
StorageVersion::<T>::get() == crate::Releases::V10_0_0,
"must upgrade linearly"
@@ -46,7 +46,7 @@ pub mod v11 {
"no data for the old pallet name has been detected"
);
Ok(())
Ok(Default::default())
}
/// Migrate the entire storage of this pallet to a new prefix.
@@ -81,7 +81,7 @@ pub mod v11 {
}
#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
fn post_upgrade(_state: Vec<u8>) -> Result<(), &'static str> {
frame_support::ensure!(
StorageVersion::<T>::get() == crate::Releases::V11_0_0,
"wrong version after the upgrade"