diff --git a/frame/elections-phragmen/src/lib.rs b/frame/elections-phragmen/src/lib.rs index adb57253799a2..d1bae611168ac 100644 --- a/frame/elections-phragmen/src/lib.rs +++ b/frame/elections-phragmen/src/lib.rs @@ -712,14 +712,14 @@ impl MigrateAccount for Module { decl_storage! { trait Store for Module as PhragmenElection { pub VotesOf get(fn votes_of): - map hasher(opaque_blake2_256) T::AccountId => Vec; + map hasher(twox_64_concat) T::AccountId => Vec; pub StakeOf get(fn stake_of): - map hasher(opaque_blake2_256) T::AccountId => BalanceOf; + map hasher(twox_64_concat) T::AccountId => BalanceOf; } } } - // TODO: will not actually do any useful migration + // Note: only migrates the hasher, migration is completed in `migration.rs` if deprecated::StakeOf::::migrate_key_from_blake(a).is_some() { deprecated::VotesOf::::migrate_key_from_blake(a); } diff --git a/frame/elections-phragmen/src/migration.rs b/frame/elections-phragmen/src/migration.rs index 1befa09a7a576..c72f45351f1f0 100644 --- a/frame/elections-phragmen/src/migration.rs +++ b/frame/elections-phragmen/src/migration.rs @@ -10,7 +10,8 @@ pub fn migrate() { { if let Some(stake) = take_storage_item::<_, BalanceOf, Twox64Concat>(b"PhragmenElection", b"StakeOf", &who) { Voting::::insert(who, (stake, votes)); + sp_runtime::print("Phragmen: inserted Voting."); } - sp_runtime::print("🕊️ Done Election Phragmen."); } + sp_runtime::print("🕊️ Done Election Phragmen."); } \ No newline at end of file