Update to latest polkadot & substrate (#266)

This commit is contained in:
Alexander Krupenkin
2020-12-16 12:50:05 +03:00
committed by GitHub
parent c84c9b6bb0
commit 8226063135
10 changed files with 352 additions and 243 deletions
+10 -3
View File
@@ -296,11 +296,18 @@ pub fn prepare_node_config(mut parachain_config: Configuration) -> Configuration
pub fn build_polkadot_full_node(
config: Configuration,
collator_id: CollatorId,
) -> sc_service::error::Result<PFullNode<PClient>> {
) -> Result<PFullNode<PClient>, polkadot_service::Error> {
let is_light = matches!(config.role, Role::Light);
if is_light {
Err("Light client not supported.".into())
Err(polkadot_service::Error::Sub(
"Light client not supported.".into(),
))
} else {
polkadot_service::build_full(config, polkadot_service::IsCollator::Yes(collator_id), None)
polkadot_service::build_full(
config,
polkadot_service::IsCollator::Yes(collator_id),
None,
None,
)
}
}