mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 13:31:10 +00:00
Implement SelectInitialValidators for () (#3037)
This is quite more idiomatic substrate :D
This commit is contained in:
@@ -220,9 +220,7 @@ pub trait SelectInitialValidators<T: Trait> {
|
||||
fn select_initial_validators() -> Option<Vec<T::AccountId>>;
|
||||
}
|
||||
|
||||
/// Implementation of `SelectInitialValidators` that does nothing.
|
||||
pub struct AllValidators;
|
||||
impl<T: Trait> SelectInitialValidators<T> for AllValidators {
|
||||
impl<T: Trait> SelectInitialValidators<T> for () {
|
||||
fn select_initial_validators() -> Option<Vec<T::AccountId>> {
|
||||
None
|
||||
}
|
||||
@@ -565,7 +563,7 @@ mod tests {
|
||||
type SessionHandler = TestSessionHandler;
|
||||
type Keys = UintAuthorityId;
|
||||
type Event = ();
|
||||
type SelectInitialValidators = AllValidators;
|
||||
type SelectInitialValidators = ();
|
||||
}
|
||||
|
||||
type System = system::Module<Test>;
|
||||
|
||||
Reference in New Issue
Block a user