mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 15:07:59 +00:00
Move inherent implementation into the modules (#924)
* Adds new `ProvideInherent` trait Also implements the new trait for `srml/consensus` and `srml/timestamp`. * Adds `impl_outer_inherent!` macro * Reexport macros from `alloc` * Introduce `RuntimeString` and fix `ProvideInherent` on `no_std` * Replace `VersionString` with `RuntimeString` * Improvements for `impl_outer_inherent!` * Make `construct_runtime!` support `impl_outer_inherent!` * Fixes after rebase * Whitespace
This commit is contained in:
@@ -54,7 +54,7 @@ use rstd::prelude::*;
|
||||
use codec::{Encode, Decode};
|
||||
|
||||
use runtime_api::runtime::*;
|
||||
use runtime_primitives::traits::{BlindCheckable, BlakeTwo256, Block as BlockT};
|
||||
use runtime_primitives::traits::{BlindCheckable, BlakeTwo256, Block as BlockT, Extrinsic as ExtrinsicT};
|
||||
use runtime_primitives::{ApplyResult, Ed25519Signature, transaction_validity::TransactionValidity};
|
||||
use runtime_version::RuntimeVersion;
|
||||
pub use primitives::hash::H256;
|
||||
@@ -115,6 +115,12 @@ impl BlindCheckable for Extrinsic {
|
||||
}
|
||||
}
|
||||
|
||||
impl ExtrinsicT for Extrinsic {
|
||||
fn is_signed(&self) -> Option<bool> {
|
||||
Some(true)
|
||||
}
|
||||
}
|
||||
|
||||
/// An identifier for an account on this system.
|
||||
pub type AccountId = H256;
|
||||
/// A simple hash type for all our hashing.
|
||||
@@ -185,7 +191,7 @@ impl_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl BlockBuilder<Block, u32, u32, u32> for Runtime {
|
||||
impl BlockBuilder<Block, u32, u32, u32, u32> for Runtime {
|
||||
fn initialise_block(header: <Block as BlockT>::Header) {
|
||||
system::initialise_block(header)
|
||||
}
|
||||
@@ -202,7 +208,7 @@ impl_apis! {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn check_inherents(_block: Block, _data: u32) -> Result<(), runtime_api::BlockBuilderError> {
|
||||
fn check_inherents(_block: Block, _data: u32) -> Result<(), u32> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user