move generics of election trait to associated types (#10475)

* move generics of election trait to associated types

* fix doctest
This commit is contained in:
Kian Paimani
2021-12-16 07:24:28 +01:00
committed by GitHub
parent 1b0be8ae06
commit f10203c793
9 changed files with 101 additions and 54 deletions
@@ -55,11 +55,8 @@ pub async fn execute<Runtime: crate::RuntimeT, Block: BlockT + DeserializeOwned>
<Runtime as pallet_staking::Config>::SortedListProvider::count(),
);
let voters = <pallet_staking::Pallet<Runtime> as ElectionDataProvider<
Runtime::AccountId,
Runtime::BlockNumber,
>>::voters(voter_limit)
.unwrap();
let voters =
<pallet_staking::Pallet<Runtime> as ElectionDataProvider>::voters(voter_limit).unwrap();
let mut voters_nominator_only = voters
.iter()