Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fmt
  • Loading branch information
kianenigma committed Oct 10, 2022
commit 2812c0fb91962a5e49b42cea2bb01805d1f4ca94
2 changes: 1 addition & 1 deletion frame/election-provider-multi-phase/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,10 @@ pub mod helpers;

const LOG_TARGET: &str = "runtime::election-provider";

pub mod migrations;
pub mod signed;
pub mod unsigned;
pub mod weights;
pub mod migrations;
use unsigned::VoterOf;
pub use weights::WeightInfo;

Expand Down
5 changes: 3 additions & 2 deletions frame/election-provider-multi-phase/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
pub mod v1 {
use frame_support::{
storage::unhashed,
traits::{GetStorageVersion, OnRuntimeUpgrade, Defensive},
traits::{Defensive, GetStorageVersion, OnRuntimeUpgrade},
BoundedVec,
};
use sp_std::collections::btree_map::BTreeMap;
Expand All @@ -44,7 +44,8 @@ pub mod v1 {
let now = frame_system::Pallet::<T>::block_number();
let map = unhashed::get::<BTreeMap<ElectionScore, u32>>(
&SignedSubmissionIndices::<T>::hashed_key(),
).defensive_unwrap_or_default();
)
.defensive_unwrap_or_default();
let vector = map
.into_iter()
.map(|(score, index)| (score, now, index))
Expand Down