From b0ce4a29730da614f9c81d50ac6275f49ad0dc05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Tue, 28 Apr 2020 16:55:14 +0200 Subject: [PATCH 1/2] Fix collator interfaces to make them work with Cumulus --- collator/src/lib.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/collator/src/lib.rs b/collator/src/lib.rs index 3e01e4cbb72c..0583bd2b5b54 100644 --- a/collator/src/lib.rs +++ b/collator/src/lib.rs @@ -52,7 +52,7 @@ use std::pin::Pin; use futures::{future, Future, Stream, FutureExt, TryFutureExt, StreamExt, task::Spawn}; use log::warn; -use sc_client_api::StateBackend; +use sc_client_api::{StateBackend, BlockchainEvents}; use sp_core::Pair; use polkadot_primitives::{ BlockId, Hash, Block, @@ -128,7 +128,7 @@ pub trait BuildParachainContext { network: impl Network + Clone + 'static, ) -> Result where - Client: ProvideRuntimeApi, + Client: ProvideRuntimeApi + Send + Sync + BlockchainEvents + 'static, Client::Api: RuntimeApiCollection, >::StateBackend: StateBackend>, Extrinsic: codec::Codec + Send + Sync + 'static, @@ -200,9 +200,7 @@ pub async fn collate

( Ok(collation) } - fn build_collator_service( - spawner: SP, handles: polkadot_service::FullNodeHandles, client: Arc, para_id: ParaId, From 2d7e22d1c09bea3b9b6465cecaebdbf47a984a7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Tue, 28 Apr 2020 17:07:31 +0200 Subject: [PATCH 2/2] Fix the fix --- collator/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/collator/src/lib.rs b/collator/src/lib.rs index 0583bd2b5b54..49ccbcc29c0e 100644 --- a/collator/src/lib.rs +++ b/collator/src/lib.rs @@ -201,6 +201,7 @@ pub async fn collate

( } fn build_collator_service( + spawner: SP, handles: polkadot_service::FullNodeHandles, client: Arc, para_id: ParaId,