diff --git a/ceremonies/src/migrations.rs b/ceremonies/src/migrations.rs index 87d1e75e..befc2715 100644 --- a/ceremonies/src/migrations.rs +++ b/ceremonies/src/migrations.rs @@ -26,7 +26,7 @@ pub mod v1 { impl OnRuntimeUpgrade for Migration { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, sp_runtime::DispatchError> { assert_eq!(StorageVersion::get::>(), 0, "can only upgrade from version 0"); let attestations = v0::AttestationRegistry::::iter(); @@ -60,7 +60,7 @@ pub mod v1 { } #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { + fn post_upgrade(state: Vec) -> Result<(), sp_runtime::DispatchError> { assert_eq!(StorageVersion::get::>(), 1, "must upgrade"); let old_attestation_count: u32 = diff --git a/communities/src/migrations.rs b/communities/src/migrations.rs index d53ce5e3..439d369a 100644 --- a/communities/src/migrations.rs +++ b/communities/src/migrations.rs @@ -53,7 +53,7 @@ pub mod v1 { impl OnRuntimeUpgrade for Migration { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, sp_runtime::DispatchError> { assert_eq!(StorageVersion::get::>(), 0, "can only upgrade from version 0"); let cid_count = v0::CommunityIdentifiers::::get().len() as u32; @@ -126,7 +126,7 @@ pub mod v1 { } #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { + fn post_upgrade(state: Vec) -> Result<(), sp_runtime::DispatchError> { assert_eq!(StorageVersion::get::>(), 1, "must upgrade"); let (