Skip to content

Commit

Permalink
Fix staking migration (#12373)
Browse files Browse the repository at this point in the history
Causing issues on Kusama...

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
  • Loading branch information
ggwpez authored Sep 28, 2022
1 parent 01a905e commit 1b1a5e1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions frame/staking/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
Expand Down

0 comments on commit 1b1a5e1

Please sign in to comment.