Skip to content

Commit

Permalink
SNO-369: Use Option for initial_sync in GenesisConfig (paritytech#719)
Browse files Browse the repository at this point in the history
* Use Option for initial_sync in GenesisConfig

* Fix import path

This was blocking the E2E tests (both bootstrap and the full suite).
  • Loading branch information
doubledup authored Nov 9, 2022
1 parent 97a76fa commit 4b0c362
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions parachain/pallets/ethereum-beacon-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,13 @@ pub mod pallet {

#[pallet::genesis_config]
pub struct GenesisConfig<T: Config> {
pub initial_sync: InitialSyncOf<T>,
pub initial_sync: Option<InitialSyncOf<T>>,
}

#[cfg(feature = "std")]
impl<T: Config> Default for GenesisConfig<T> {
fn default() -> Self { GenesisConfig {
initial_sync: Default::default(),
initial_sync: None,
}}
}

Expand All @@ -173,9 +173,11 @@ pub mod pallet {
config::SYNC_COMMITTEE_SIZE
);

Pallet::<T>::initial_sync(
self.initial_sync.clone(),
).unwrap();
if let Some(initial_sync) = self.initial_sync.clone() {
Pallet::<T>::initial_sync(
initial_sync,
).unwrap();
}
}
}

Expand Down

0 comments on commit 4b0c362

Please sign in to comment.