Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cumulus/parachains/runtimes/test-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ impl<Runtime: BasicParachainRuntime> ExtBuilder<Runtime> {
.assimilate_storage(&mut t)
.unwrap();

pallet_session::GenesisConfig::<Runtime> { keys: self.keys }
pallet_session::GenesisConfig::<Runtime> { keys: self.keys, ..Default::default() }
.assimilate_storage(&mut t)
.unwrap();

Expand Down
5 changes: 4 additions & 1 deletion substrate/frame/session/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,9 @@ pub mod pallet {
#[derive(frame_support::DefaultNoBound)]
pub struct GenesisConfig<T: Config> {
pub keys: Vec<(T::AccountId, T::ValidatorId, T::Keys)>,
/// Keys injected for a validatorId, but that will not be considered
/// in the initial validators list
pub non_authority_keys: Vec<(T::AccountId, T::ValidatorId, T::Keys)>
}

#[pallet::genesis_build]
Expand All @@ -446,7 +449,7 @@ pub mod pallet {
}
});

for (account, val, keys) in self.keys.iter().cloned() {
for (account, val, keys) in self.keys.iter().chain(self.non_authority_keys.iter()).cloned() {
Pallet::<T>::inner_set_keys(&val, keys)
.expect("genesis config must not contain duplicates; qed");
if frame_system::Pallet::<T>::inc_consumers_without_limit(&account).is_err() {
Expand Down