Support authoring for multiple runtime versions (#816)

This commit is contained in:
Arkadiy Paronyan
2018-09-27 14:56:40 +02:00
committed by Gav Wood
parent 5eb1aefde6
commit 29c9719568
11 changed files with 77 additions and 32 deletions
+11
View File
@@ -59,6 +59,8 @@ use runtime_primitives::traits::{BlindCheckable, BlakeTwo256};
use runtime_primitives::Ed25519Signature;
use runtime_version::RuntimeVersion;
pub use primitives::hash::H256;
#[cfg(any(feature = "std", test))]
use runtime_version::NativeVersion;
/// Test runtime version.
pub const VERSION: RuntimeVersion = RuntimeVersion {
@@ -74,6 +76,15 @@ fn version() -> RuntimeVersion {
VERSION
}
/// Native version.
#[cfg(any(feature = "std", test))]
pub fn native_version() -> NativeVersion {
NativeVersion {
runtime_version: VERSION,
can_author_with: Default::default(),
}
}
/// Calls in transactions.
#[derive(Clone, PartialEq, Eq, Encode, Decode)]
#[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))]