Migrate pallet-elections to pallet attribute macro (#9088)

* Migrate elections pallet to pallet attribute macro.

* Metadata fix.

* Update frame/elections/src/lib.rs

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
Shaun Wang
2021-06-17 02:17:57 +12:00
committed by GitHub
parent ae5cd339b5
commit b21c49524f
2 changed files with 312 additions and 235 deletions
+2 -2
View File
@@ -20,7 +20,7 @@
#![cfg(test)]
use frame_support::{
StorageValue, StorageMap, parameter_types, assert_ok,
parameter_types, assert_ok,
traits::{ChangeMembers, Currency, LockIdentifier},
};
use sp_core::H256;
@@ -266,7 +266,7 @@ pub(crate) fn new_test_ext_with_candidate_holes() -> sp_io::TestExternalities {
let mut t = ExtBuilder::default().build();
t.execute_with(|| {
<elections::Candidates<Test>>::put(vec![0, 0, 1]);
elections::CandidateCount::put(1);
elections::CandidateCount::<Test>::put(1);
<elections::RegisterInfoOf<Test>>::insert(1, (0, 2));
});
t