Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Prev Previous commit
fix
  • Loading branch information
gui1117 committed Dec 16, 2019
commit 886179a498800520f7b027cba3a74850eaad4f85
6 changes: 3 additions & 3 deletions frame/staking/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub const CURRENT_VERSION: VersionNumber = 2;
mod inner {
use crate::{Store, Module, Trait, ValidatorInfoForEra, SessionInterface};
use frame_support::{StorageLinkedMap, StorageValue, StorageMap, StoragePrefixedMap};
use sp_std::vec::{self, Vec};
use sp_std::vec::Vec;
use super::{CURRENT_VERSION, VersionNumber};

// the minimum supported version of the migration logic.
Expand Down Expand Up @@ -87,13 +87,13 @@ mod inner {

<Module<T> as Store>::ValidatorForEra::insert(&current_era, current_validator_infos);
<Module<T> as Store>::SlotStakeForEra::insert(&current_era, current_slot_stake);
<Module<T> as Store>::EraStartSessionIndex::put(vec![current_era]);
<Module<T> as Store>::EraStartSessionIndex::put(sp_std::vec![current_era]);

<Module<T> as Store>::Stakers::remove_all();
<Module<T> as Store>::CurrentElected::kill();
<Module<T> as Store>::SlotStake::kill();

support::print("Finished migrating Staking storage to v2.");
frame_support::print("Finished migrating Staking storage to v2.");
}

pub(super) fn perform_migrations<T: Trait>() {
Expand Down