Skip to content

Commit

Permalink
perf: generate_initial_session_keys: load runtime only if its relevant (
Browse files Browse the repository at this point in the history
paritytech#12651)

* perf: generate_initial_session_keys: load runtime only if its relevant

* apply review suggestion

* Update primitives/session/src/lib.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

Co-authored-by: Bastian Köcher <git@kchr.de>
  • Loading branch information
2 people authored and ltfschoen committed Feb 22, 2023
1 parent 9cc4a35 commit ce893aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions primitives/session/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ where
T: ProvideRuntimeApi<Block>,
T::Api: SessionKeys<Block>,
{
if seeds.is_empty() {
return Ok(())
}

let runtime_api = client.runtime_api();

for seed in seeds {
Expand Down

0 comments on commit ce893aa

Please sign in to comment.