Skip to content
Snippets Groups Projects
Commit 234552ab authored by Éloïs's avatar Éloïs
Browse files

fix(cli):offchain indexing must also be forced for command import-blocks

parent eee8c80d
No related branches found
No related tags found
No related merge requests found
......@@ -204,6 +204,12 @@ pub fn run() -> sc_cli::Result<()> {
Some(Subcommand::ImportBlocks(cmd)) => {
let runner = cli.create_runner(cmd)?;
runner.async_run(|mut config| {
// Force offchain worker and offchain indexing if we have the role Authority
if config.role.is_authority() {
config.offchain_worker.enabled = true;
config.offchain_worker.indexing_enabled = true;
}
let (client, _, import_queue, task_manager) =
service::new_chain_ops(&mut config, cli.sealing.is_manual_consensus())?;
Ok((cmd.run(client, import_queue), task_manager))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment