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

Commit

Permalink
perf: generate_initial_session_keys: load runtime only if its relevant (
Browse files Browse the repository at this point in the history
#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
librelois and bkchr authored Nov 22, 2022
1 parent 6cb4b67 commit 06d7a23
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 06d7a23

Please sign in to comment.