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 -2
View File
@@ -648,7 +648,7 @@ decl_module! {
fn deposit_event<T>() = default;
/// Take the origin account as a stash and lock up `value` of its balance. `controller` will
/// be the account that controls it.
/// be the account that controls it.
///
/// The dispatch origin for this call must be _Signed_ by the stash account.
///
@@ -693,7 +693,7 @@ decl_module! {
}
/// Add some extra amount that have appeared in the stash `free_balance` into the balance up
/// for staking.
/// for staking.
///
/// Use this if there are additional funds in your stash account that you wish to bond.
///
+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) {