Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Add paritytech/substrate#9997 workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
s0me0ne-unkn0wn committed Feb 13, 2023
1 parent 5c1e9e4 commit 6f2c0c9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion runtime/parachains/src/runtime_api_impl/vstaging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,13 @@ pub fn get_session_disputes<T: disputes::Config>(
pub fn session_executor_params<T: session_info::Config>(
session_index: SessionIndex,
) -> Option<ExecutorParams> {
<session_info::Pallet<T>>::session_executor_params(session_index)
// This is to bootstrap the storage working around the runtime migration issue:
// https://github.com/paritytech/substrate/issues/9997
// After the bootstrap is complete (no less than 7 session passed with the runtime)
// this code should be replaced with a pure
// <session_info::Pallet<T>>::session_executor_params(session_index) call.
match <session_info::Pallet<T>>::session_executor_params(session_index) {
Some(ep) => Some(ep),
None => Some(ExecutorParams::default())
}
}

0 comments on commit 6f2c0c9

Please sign in to comment.