mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-23 23:04:53 +00:00
Avoid pulling env into blocking context
This commit is contained in:
@@ -20,6 +20,7 @@ pub fn run<'a, T: EthSpec>(
|
||||
mut env: Environment<T>,
|
||||
) -> Result<(), String> {
|
||||
let context = env.core_context();
|
||||
let spec = context.eth2_config.spec.clone();
|
||||
|
||||
context
|
||||
.executor
|
||||
@@ -29,7 +30,7 @@ pub fn run<'a, T: EthSpec>(
|
||||
.block_on_dangerous(
|
||||
async {
|
||||
match matches.subcommand() {
|
||||
(validators::CMD, Some(matches)) => validators::cli_run(matches, env).await,
|
||||
(validators::CMD, Some(matches)) => validators::cli_run(matches, &spec).await,
|
||||
(unknown, _) => Err(format!(
|
||||
"{} is not a valid {} command. See --help.",
|
||||
unknown, CMD
|
||||
|
||||
Reference in New Issue
Block a user