Split polkadot-service (#310)

* Substrate service

* Splitting polkadot service

* Specialised components

* Specialised components

* Docs and style

* Docs and style

* Final touches

* Added db key assertion
This commit is contained in:
Arkadiy Paronyan
2018-07-14 18:07:11 +02:00
committed by Gav Wood
parent c2f78371f1
commit 16ff3579ef
16 changed files with 442 additions and 884 deletions
+2 -4
View File
@@ -66,7 +66,7 @@ use client::BlockchainEvents;
use polkadot_api::PolkadotApi;
use polkadot_primitives::BlockId;
use polkadot_primitives::parachain::{self, BlockData, HeadData, ConsolidatedIngress, Collation, Message, Id as ParaId};
use polkadot_cli::{ClientError, ServiceComponents, ClientBackend, PolkadotBlock, StateMachineBackend, Service};
use polkadot_cli::{ServiceComponents, Service};
use polkadot_cli::Worker;
/// Parachain context needed for collation.
@@ -213,9 +213,7 @@ impl<P, E> Worker for CollationNode<P, E> where
self.exit
}
fn work<C: ServiceComponents>(self, service: &Service<C>) -> Self::Work
where ClientError: From<<<<C as ServiceComponents>::Backend as ClientBackend<PolkadotBlock>>::State as StateMachineBackend>::Error>,
{
fn work<C: ServiceComponents>(self, service: &Service<C>) -> Self::Work {
let CollationNode { parachain_context, exit, para_id, key } = self;
let client = service.client();
let api = service.api();