Cleanup CLI and introduce execution-all (#3098)

* Cleanup CLI and introduce `execution-all`

`--execution-all` sets the execution strategies for all available
execution contexts.

* Rename parameter
This commit is contained in:
Bastian Köcher
2019-07-11 16:57:59 +02:00
committed by GitHub
parent b3dd034cce
commit f5e921281e
2 changed files with 38 additions and 21 deletions
+6 -5
View File
@@ -424,12 +424,13 @@ where
};
let exec = cli.execution_strategies;
let exec_all_or = |strat: params::ExecutionStrategy| exec.execution.unwrap_or(strat).into();
config.execution_strategies = ExecutionStrategies {
syncing: exec.syncing_execution.into(),
importing: exec.importing_execution.into(),
block_construction: exec.block_construction_execution.into(),
offchain_worker: exec.offchain_worker_execution.into(),
other: exec.other_execution.into(),
syncing: exec_all_or(exec.execution_syncing),
importing: exec_all_or(exec.execution_import_block),
block_construction: exec_all_or(exec.execution_block_construction),
offchain_worker: exec_all_or(exec.execution_offchain_worker),
other: exec_all_or(exec.execution_other),
};
config.offchain_worker = match (cli.offchain_worker, role) {