Fix compilation

This commit is contained in:
Bastian Köcher
2019-07-04 18:04:22 +02:00
parent 249eb4dbdf
commit 006bec18ba
2 changed files with 329 additions and 300 deletions
+322 -296
View File
File diff suppressed because it is too large Load Diff
+7 -4
View File
@@ -20,7 +20,9 @@ use runtime_primitives::traits::Block as BlockT;
use consensus_common::{Environment, Proposer}; use consensus_common::{Environment, Proposer};
use polkadot_collator::{InvalidHead, ParachainContext}; use polkadot_collator::{InvalidHead, ParachainContext};
use polkadot_primitives::parachain::{self, BlockData, Message, Id as ParaId, Extrinsic}; use polkadot_primitives::{
Hash, parachain::{self, BlockData, Message, Id as ParaId, Extrinsic, Status as ParachainStatus}
};
use codec::{Decode, Encode}; use codec::{Decode, Encode};
use log::error; use log::error;
@@ -45,7 +47,7 @@ impl<Block: BlockT, PF: Environment<Block>> Collator<Block, PF> {
/// Create a new instance. /// Create a new instance.
fn new( fn new(
proposer_factory: Arc<PF>, proposer_factory: Arc<PF>,
inherent_data_providers: inherent_data::InherentDataProviders inherent_data_providers: inherents::InherentDataProviders
) -> Self { ) -> Self {
Self { Self {
proposer_factory, proposer_factory,
@@ -77,13 +79,14 @@ where
fn produce_candidate<I: IntoIterator<Item=(ParaId, Message)>>( fn produce_candidate<I: IntoIterator<Item=(ParaId, Message)>>(
&self, &self,
last_head: parachain::HeadData, _relay_chain_parent: Hash,
status: ParachainStatus,
_: I, _: I,
) -> Self::ProduceCandidate { ) -> Self::ProduceCandidate {
let factory = self.proposer_factory.clone(); let factory = self.proposer_factory.clone();
let inherent_providers = self.inherent_data_providers.clone(); let inherent_providers = self.inherent_data_providers.clone();
let res = HeadData::<Block>::decode(&mut &last_head.0[..]) let res = HeadData::<Block>::decode(&mut &status.head_data.0[..])
.ok_or_else(|| InvalidHead).into_future() .ok_or_else(|| InvalidHead).into_future()
.and_then(move |last_head| .and_then(move |last_head|
factory.init(&last_head.header).map_err(|e| { factory.init(&last_head.header).map_err(|e| {