mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 19:11:04 +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
@@ -463,17 +463,17 @@ macro_rules! impl_outer_log {
|
||||
}
|
||||
|
||||
//TODO: https://github.com/paritytech/substrate/issues/1022
|
||||
/// Inherent data to include in a block.
|
||||
/// Basic Inherent data to include in a block; used by simple runtimes.
|
||||
#[derive(Encode, Decode)]
|
||||
pub struct InherentData {
|
||||
pub struct BasicInherentData {
|
||||
/// Current timestamp.
|
||||
pub timestamp: u64,
|
||||
/// Indices of offline validators.
|
||||
pub consensus: Vec<u32>,
|
||||
}
|
||||
|
||||
impl InherentData {
|
||||
/// Create a new `InherentData` instance.
|
||||
impl BasicInherentData {
|
||||
/// Create a new `BasicInherentData` instance.
|
||||
pub fn new(timestamp: u64, consensus: Vec<u32>) -> Self {
|
||||
Self {
|
||||
timestamp,
|
||||
|
||||
Reference in New Issue
Block a user