mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 01:11:10 +00:00
Make sure that srml-collective does not initialize Members twice (#3379)
* Make sure that `srml-collective` does not initialize `Members` twice * Implement trait for `()` * Fix test
This commit is contained in:
committed by
Gavin Wood
parent
7f764dbd37
commit
0c941d66cb
@@ -689,3 +689,13 @@ impl<T: Clone + Ord> ChangeMembers<T> for () {
|
||||
fn change_members_sorted(_: &[T], _: &[T], _: &[T]) {}
|
||||
fn set_members_sorted(_: &[T], _: &[T]) {}
|
||||
}
|
||||
|
||||
/// Trait for type that can handle the initialization of account IDs at genesis.
|
||||
pub trait InitializeMembers<AccountId> {
|
||||
/// Initialize the members to the given `members`.
|
||||
fn initialize_members(members: &[AccountId]);
|
||||
}
|
||||
|
||||
impl<T> InitializeMembers<T> for () {
|
||||
fn initialize_members(_: &[T]) {}
|
||||
}
|
||||
Reference in New Issue
Block a user