diff --git a/pallets/parachain-staking/src/migrations.rs b/pallets/parachain-staking/src/migrations.rs index b5fc29e189..4c689e451d 100644 --- a/pallets/parachain-staking/src/migrations.rs +++ b/pallets/parachain-staking/src/migrations.rs @@ -80,6 +80,8 @@ impl OnRuntimeUpgrade for MigrateParachainBondConfig { #[cfg(feature = "try-runtime")] fn post_upgrade(state: Vec) -> Result<(), sp_runtime::DispatchError> { + use frame_support::ensure; + let old_state: OldParachainBondConfig = parity_scale_codec::Decode::decode(&mut &state[..]) .map_err(|_| sp_runtime::DispatchError::Other("Failed to decode old state"))?;