mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 19:51:05 +00:00
Runtime version (#256)
* Runtime version * Updated genesis.wasm * Minor fixes * Fresh runtime * Default version for pre Poc-2; Fixed authorship interface check * Fixed authoring check
This commit is contained in:
committed by
Gav Wood
parent
e6a7c64518
commit
12268ae700
@@ -25,6 +25,7 @@ substrate-runtime-session = { path = "../../substrate/runtime/session" }
|
||||
substrate-runtime-staking = { path = "../../substrate/runtime/staking" }
|
||||
substrate-runtime-system = { path = "../../substrate/runtime/system" }
|
||||
substrate-runtime-timestamp = { path = "../../substrate/runtime/timestamp" }
|
||||
substrate-runtime-version = { path = "../../substrate/runtime/version" }
|
||||
demo-primitives = { path = "../primitives" }
|
||||
|
||||
[features]
|
||||
@@ -44,6 +45,7 @@ std = [
|
||||
"substrate-runtime-staking/std",
|
||||
"substrate-runtime-system/std",
|
||||
"substrate-runtime-timestamp/std",
|
||||
"substrate-runtime-version/std",
|
||||
"demo-primitives/std",
|
||||
"serde_derive",
|
||||
"serde/std",
|
||||
|
||||
@@ -43,12 +43,15 @@ extern crate substrate_runtime_session as session;
|
||||
extern crate substrate_runtime_staking as staking;
|
||||
extern crate substrate_runtime_system as system;
|
||||
extern crate substrate_runtime_timestamp as timestamp;
|
||||
#[macro_use]
|
||||
extern crate substrate_runtime_version as version;
|
||||
extern crate demo_primitives;
|
||||
|
||||
use rstd::prelude::*;
|
||||
use demo_primitives::{AccountId, AccountIndex, Balance, BlockNumber, Hash, Index, SessionKey, Signature};
|
||||
use runtime_primitives::generic;
|
||||
use runtime_primitives::traits::{Convert, HasPublicAux, BlakeTwo256};
|
||||
use version::RuntimeVersion;
|
||||
|
||||
#[cfg(any(feature = "std", test))]
|
||||
pub use runtime_primitives::BuildStorage;
|
||||
@@ -59,6 +62,22 @@ pub use runtime_primitives::BuildStorage;
|
||||
/// Concrete runtime type used to parameterize the various modules.
|
||||
pub struct Concrete;
|
||||
|
||||
/// Runtime version.
|
||||
pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
spec_name: ver_str!("demo"),
|
||||
impl_name: ver_str!("parity-demo"),
|
||||
authoring_version: 0,
|
||||
spec_version: 0,
|
||||
impl_version: 0,
|
||||
};
|
||||
|
||||
/// Version module for this concrete runtime.
|
||||
pub type Version = version::Module<Concrete>;
|
||||
|
||||
impl version::Trait for Concrete {
|
||||
const VERSION: RuntimeVersion = VERSION;
|
||||
}
|
||||
|
||||
impl HasPublicAux for Concrete {
|
||||
type PublicAux = AccountId;
|
||||
}
|
||||
@@ -189,6 +208,7 @@ impl_outer_config! {
|
||||
|
||||
pub mod api {
|
||||
impl_stubs!(
|
||||
version => |()| super::Version::version(),
|
||||
authorities => |()| super::Consensus::authorities(),
|
||||
initialise_block => |header| super::Executive::initialise_block(&header),
|
||||
apply_extrinsic => |extrinsic| super::Executive::apply_extrinsic(extrinsic),
|
||||
|
||||
Generated
+12
@@ -137,6 +137,7 @@ dependencies = [
|
||||
"substrate-runtime-support 0.1.0",
|
||||
"substrate-runtime-system 0.1.0",
|
||||
"substrate-runtime-timestamp 0.1.0",
|
||||
"substrate-runtime-version 0.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -972,6 +973,17 @@ dependencies = [
|
||||
"substrate-runtime-system 0.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "substrate-runtime-version"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"serde 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"substrate-codec 0.1.0",
|
||||
"substrate-runtime-std 0.1.0",
|
||||
"substrate-runtime-support 0.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "substrate-state-machine"
|
||||
version = "0.1.0"
|
||||
|
||||
@@ -23,6 +23,7 @@ substrate-runtime-session = { path = "../../../substrate/runtime/session", defau
|
||||
substrate-runtime-staking = { path = "../../../substrate/runtime/staking", default-features = false }
|
||||
substrate-runtime-system = { path = "../../../substrate/runtime/system", default-features = false }
|
||||
substrate-runtime-timestamp = { path = "../../../substrate/runtime/timestamp", default-features = false }
|
||||
substrate-runtime-version = { path = "../../../substrate/runtime/version", default-features = false }
|
||||
demo-primitives = { path = "../../primitives", default-features = false }
|
||||
|
||||
[features]
|
||||
@@ -43,6 +44,7 @@ std = [
|
||||
"substrate-runtime-staking/std",
|
||||
"substrate-runtime-system/std",
|
||||
"substrate-runtime-timestamp/std",
|
||||
"substrate-runtime-version/std",
|
||||
"demo-primitives/std",
|
||||
]
|
||||
|
||||
|
||||
BIN
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user