From 0a9a14437896139267cc4bd6b02d59da90051301 Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Fri, 16 Feb 2018 17:28:42 +0100 Subject: [PATCH] Verify header justification during import (#76) * reshuffle consensus libraries * polkadot-useful type definitions for statement table * begin BftService * primary selection logic * bft service implementation without I/O * extract out `BlockImport` trait * allow bft primitives to compile on wasm * Block builder (substrate) * take polkadot-consensus down to the core. * test for preemption * fix test build * Fix wasm build * Bulid on any block * Test for block builder. * Block import tests for client. * Tidy ups * clean up block builder instantiation * justification verification logic * JustifiedHeader and import * Propert block generation for tests * Fixed rpc tests --- polkadot/api/src/lib.rs | 2 +- polkadot/primitives/src/block.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/polkadot/api/src/lib.rs b/polkadot/api/src/lib.rs index a16781eb69..efe0f45220 100644 --- a/polkadot/api/src/lib.rs +++ b/polkadot/api/src/lib.rs @@ -28,12 +28,12 @@ extern crate substrate_state_machine as state_machine; extern crate error_chain; use client::backend::Backend; -use client::blockchain::BlockId; use client::Client; use polkadot_runtime::runtime; use polkadot_executor::Executor as LocalDispatch; use substrate_executor::{NativeExecutionDispatch, NativeExecutor}; use primitives::{AccountId, SessionKey}; +use primitives::block::Id as BlockId; use primitives::parachain::DutyRoster; error_chain! { diff --git a/polkadot/primitives/src/block.rs b/polkadot/primitives/src/block.rs index d71fa82e1c..987744baa6 100644 --- a/polkadot/primitives/src/block.rs +++ b/polkadot/primitives/src/block.rs @@ -23,6 +23,8 @@ use rstd::vec::Vec; use codec::{Input, Slicable}; use transaction::UncheckedTransaction; +pub use primitives::block::Id; + /// Used to refer to a block number. pub type Number = u64;