Refactor service to allow building full (and light) node matching chain spec (#1467)

This commit is contained in:
Cecile Tonglet
2020-07-27 07:54:24 +02:00
committed by GitHub
parent fa598f176b
commit 1cb92aa83e
3 changed files with 101 additions and 74 deletions
+2 -2
View File
@@ -46,8 +46,8 @@ async fn start_inner(chain_spec: String, log_level: String) -> Result<Client, Bo
info!("👤 Role: {}", config.display_role());
// Create the service. This is the most heavy initialization step.
let (task_manager, rpc_handlers) = service::kusama_new_light(config)
.map_err(|e| format!("{:?}", e))?;
let builder = service::NodeBuilder::new(config);
let (task_manager, rpc_handlers) = builder.build_light().map_err(|e| format!("{:?}", e))?;
Ok(browser_utils::start_client(task_manager, rpc_handlers))
}