make block builder and construct_runtime! generic over inherent-data (#1191)

* make block builder generic over inherent-data

* construct_runtime has you specify inherent data type

* get all tests to compile
This commit is contained in:
Robert Habermeier
2018-12-03 11:49:30 +01:00
committed by GitHub
parent 69a288e586
commit 63980e3770
17 changed files with 96 additions and 109 deletions
+4 -4
View File
@@ -56,7 +56,7 @@ use runtime_primitives::{
traits::{
BlindCheckable, BlakeTwo256, Block as BlockT, Extrinsic as ExtrinsicT,
GetNodeBlockType, GetRuntimeBlockType
}, InherentData, CheckInherentError
}, CheckInherentError
};
use runtime_version::RuntimeVersion;
pub use primitives::hash::H256;
@@ -220,7 +220,7 @@ impl_runtime_apis! {
}
}
impl block_builder_api::BlockBuilder<Block> for Runtime {
impl block_builder_api::BlockBuilder<Block, ()> for Runtime {
fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyResult {
system::execute_transaction(extrinsic)
}
@@ -229,11 +229,11 @@ impl_runtime_apis! {
system::finalise_block()
}
fn inherent_extrinsics(_data: InherentData) -> Vec<<Block as BlockT>::Extrinsic> {
fn inherent_extrinsics(_data: ()) -> Vec<<Block as BlockT>::Extrinsic> {
unimplemented!()
}
fn check_inherents(_block: Block, _data: InherentData) -> Result<(), CheckInherentError> {
fn check_inherents(_block: Block, _data: ()) -> Result<(), CheckInherentError> {
unimplemented!()
}