mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 15:11:03 +00:00
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:
committed by
GitHub
parent
69a288e586
commit
63980e3770
@@ -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!()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user