Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

migrate pallet-elections-phragmen to attribute macros #8044

Merged
26 commits merged into from
Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
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
11 changes: 6 additions & 5 deletions frame/elections-phragmen/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use super::*;

use frame_system::RawOrigin;
use frame_benchmarking::{benchmarks, account};
use frame_support::traits::OnInitialize;
use frame_support::{dispatch::DispatchResultWithPostInfo, traits::OnInitialize};

use crate::Module as Elections;

Expand Down Expand Up @@ -95,11 +95,12 @@ fn submit_candidates_with_self_vote<T: Config>(c: u32, prefix: &'static str)
Ok(candidates)
}


/// Submit one voter.
fn submit_voter<T: Config>(caller: T::AccountId, votes: Vec<T::AccountId>, stake: BalanceOf<T>)
-> frame_support::dispatch::DispatchResult
{
fn submit_voter<T: Config>(
caller: T::AccountId,
votes: Vec<T::AccountId>,
stake: BalanceOf<T>,
) -> DispatchResultWithPostInfo {
<Elections<T>>::vote(RawOrigin::Signed(caller).into(), votes, stake)
}

Expand Down
Loading