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
@@ -180,9 +180,9 @@ impl<F: ServiceFactory> TestNet<F> {
}
}
pub fn connectivity<F: ServiceFactory>(spec: FactoryChainSpec<F>) where
pub fn connectivity<F: ServiceFactory, Inherent>(spec: FactoryChainSpec<F>) where
<F as ServiceFactory>::RuntimeApi:
client::block_builder::api::BlockBuilder<<F as service::ServiceFactory>::Block>
client::block_builder::api::BlockBuilder<<F as service::ServiceFactory>::Block, Inherent>
{
const NUM_NODES: u32 = 10;
{
@@ -224,7 +224,7 @@ where
B: Fn(&F::FullService) -> ImportBlock<F::Block>,
E: Fn(&F::FullService) -> FactoryExtrinsic<F>,
<F as ServiceFactory>::RuntimeApi:
client::block_builder::api::BlockBuilder<<F as service::ServiceFactory>::Block> +
client::block_builder::api::BlockBuilder<<F as service::ServiceFactory>::Block, ()> +
client::runtime_api::TaggedTransactionQueue<<F as service::ServiceFactory>::Block>
{
const NUM_NODES: u32 = 10;
@@ -263,7 +263,7 @@ pub fn consensus<F>(spec: FactoryChainSpec<F>, authorities: Vec<String>)
where
F: ServiceFactory,
<F as ServiceFactory>::RuntimeApi:
client::block_builder::api::BlockBuilder<<F as service::ServiceFactory>::Block>
client::block_builder::api::BlockBuilder<<F as service::ServiceFactory>::Block, ()>
{
const NUM_NODES: u32 = 20;
const NUM_BLOCKS: u64 = 200;