Technical Committee (#3041)

* Add copy of council seats as elections module.

* Split council into collective and elections modules.

Make collective instanceable.

* Propagate changes to the runtime and fix origin/event

* insert_ref and put_ref to avoid copies.

* Add tests

* Fix up collective's tests

* One more test

* Fix elections module tests

* Missed merge line

* Minor fix

* Test fixes

* Line widths

* Line widths

* Rntime version

* Remove comment

* Deduplicate

* Bump runtime again

* Fix test
This commit is contained in:
Gavin Wood
2019-07-10 14:29:14 +02:00
committed by GitHub
parent 8f81bd90e7
commit df93867620
19 changed files with 1958 additions and 1408 deletions
+2 -3
View File
@@ -52,10 +52,9 @@ thread_local! {
pub struct TestSessionHandler;
impl session::SessionHandler<AccountId> for TestSessionHandler {
fn on_new_session<Ks: OpaqueKeys>(_changed: bool, validators: &[(AccountId, Ks)]) {
SESSION.with(|x| {
let v = validators.iter().map(|(ref a, _)| a).cloned().collect::<Vec<_>>();
SESSION.with(|x|
*x.borrow_mut() = (validators.iter().map(|x| x.0.clone()).collect(), HashSet::new())
});
);
}
fn on_disabled(validator_index: usize) {