Fix staking migration (#12373)

Causing issues on Kusama...

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 authored and GitHub committed 2022-09-28 12:43:04 +00:00
1 parent 70f372ae38
commit 8227950ed5
1 file changed
+8 -4
+8 -4
View File
@@ -40,10 +40,14 @@ pub mod v12 {
"Expected v11 before upgrading to v12"
);
frame_support::ensure!(
T::HistoryDepth::get() == HistoryDepth::<T>::get(),
"Provided value of HistoryDepth should be same as the existing storage value"
);
if HistoryDepth::<T>::exists() {
frame_support::ensure!(
T::HistoryDepth::get() == HistoryDepth::<T>::get(),
"Provided value of HistoryDepth should be same as the existing storage value"
);
} else {
log::info!("No HistoryDepth in storage; nothing to remove");
}
Ok(Default::default())
}