mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-06 00:58:02 +00:00
[FRAME] Test for sane genesis default (#3412)
Closes https://github.com/paritytech/polkadot-sdk/issues/2713 --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
cd91c6b782
commit
e76b244853
@@ -323,7 +323,7 @@ pub mod pallet {
|
||||
#[pallet::genesis_config]
|
||||
pub struct GenesisConfig<T: Config> {
|
||||
pub authorities: Vec<(AuthorityId, BabeAuthorityWeight)>,
|
||||
pub epoch_config: Option<BabeEpochConfiguration>,
|
||||
pub epoch_config: BabeEpochConfiguration,
|
||||
#[serde(skip)]
|
||||
pub _config: sp_std::marker::PhantomData<T>,
|
||||
}
|
||||
@@ -333,9 +333,7 @@ pub mod pallet {
|
||||
fn build(&self) {
|
||||
SegmentIndex::<T>::put(0);
|
||||
Pallet::<T>::initialize_genesis_authorities(&self.authorities);
|
||||
EpochConfig::<T>::put(
|
||||
self.epoch_config.clone().expect("epoch_config must not be None"),
|
||||
);
|
||||
EpochConfig::<T>::put(&self.epoch_config);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user