Track and accumulate ingress roots in runtime (#287)

* track unrouted ingress in runtime

* test ingress routing

* fix compilation

* add space

Co-Authored-By: Gavin Wood <github@gavwood.com>
This commit is contained in:
Robert Habermeier
2019-06-17 14:38:03 +02:00
committed by GitHub
parent bc59254f41
commit 58ab4f6b9f
7 changed files with 263 additions and 101 deletions
+4 -4
View File
@@ -30,7 +30,7 @@ use futures::sync::oneshot;
use polkadot_primitives::{Block, SessionKey, Hash, Header};
use polkadot_primitives::parachain::{
Id as ParaId, BlockData, CollatorId, CandidateReceipt, Collation, PoVBlock,
ConsolidatedIngressRoots,
StructuredUnroutedIngress,
};
use substrate_network::{PeerId, RequestId, Context};
use substrate_network::{message, generic_message};
@@ -83,7 +83,7 @@ struct PoVBlockRequest {
candidate_hash: Hash,
block_data_hash: Hash,
sender: oneshot::Sender<PoVBlock>,
canon_roots: ConsolidatedIngressRoots,
canon_roots: StructuredUnroutedIngress,
}
impl PoVBlockRequest {
@@ -218,7 +218,7 @@ impl PolkadotProtocol {
ctx: &mut Context<Block>,
candidate: &CandidateReceipt,
relay_parent: Hash,
canon_roots: ConsolidatedIngressRoots,
canon_roots: StructuredUnroutedIngress,
) -> oneshot::Receiver<PoVBlock> {
let (tx, rx) = oneshot::channel();
@@ -547,7 +547,7 @@ impl Specialization<Block> for PolkadotProtocol {
validation_session_parent: Default::default(),
candidate_hash: Default::default(),
block_data_hash: Default::default(),
canon_roots: ConsolidatedIngressRoots(Vec::new()),
canon_roots: StructuredUnroutedIngress(Vec::new()),
sender,
}));
}