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

fix(node):force offchain worker & offchain indexing if role is authority

parent 53ee4c94
No related branches found
No related tags found
No related merge requests found
......@@ -245,7 +245,13 @@ pub fn run() -> sc_cli::Result<()> {
}
None => {
let runner = cli.create_runner(&cli.run)?;
runner.run_node_until_exit(|config| async move {
runner.run_node_until_exit(|mut config| async move {
// 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;
}
match config.chain_spec.runtime_type() {
#[cfg(feature = "g1")]
RuntimeType::G1 => {
......
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