Commit 1690b05c authored by Cecile Tonglet's avatar Cecile Tonglet
Browse files

Adapting code

parent 44ed5c63
......@@ -35,7 +35,7 @@ pub use service::{
TFullClient, TLightClient, TFullBackend, TLightBackend, TFullCallExecutor, TLightCallExecutor,
Configuration, ChainSpec,
};
pub use service::config::{DatabaseConfig, PrometheusConfig, full_version_from_strs};
pub use service::config::{DatabaseConfig, PrometheusConfig};
pub use sc_executor::NativeExecutionDispatch;
pub use sc_client::{ExecutionStrategy, CallExecutor, Client};
pub use sc_client_api::backend::Backend;
......@@ -115,7 +115,7 @@ pub trait IsKusama {
fn is_kusama(&self) -> bool;
}
impl IsKusama for &dyn ChainSpec {
impl IsKusama for Box<dyn ChainSpec> {
fn is_kusama(&self) -> bool {
self.id().starts_with("kusama") || self.id().starts_with("ksm")
}
......@@ -155,7 +155,7 @@ macro_rules! new_full_start {
let select_chain = select_chain.take()
.ok_or_else(|| service::Error::SelectChainRequired)?;
let grandpa_hard_forks = if config.expect_chain_spec().is_kusama() {
let grandpa_hard_forks = if config.chain_spec.is_kusama() {
grandpa_support::kusama_hard_forks()
} else {
Vec::new()
......@@ -319,13 +319,13 @@ pub fn new_full<Runtime, Dispatch, Extrinsic>(
let is_authority = config.roles.is_authority() && !is_collator;
let force_authoring = config.force_authoring;
let max_block_data_size = max_block_data_size;
let db_path = if let DatabaseConfig::Path { ref path, .. } = config.expect_database() {
let db_path = if let DatabaseConfig::Path { ref path, .. } = config.database {
path.clone()
} else {
return Err("Starting a Polkadot service with a custom database isn't supported".to_string().into());
};
let disable_grandpa = config.disable_grandpa;
let name = config.name.clone();
let name = config.network.node_name.clone();
let authority_discovery_enabled = authority_discovery_enabled;
let sentry_nodes = config.network.sentry_nodes.clone();
let slot_duration = slot_duration;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment