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
@@ -69,6 +69,8 @@ use runtime_primitives::generic;
use runtime_primitives::traits::{Convert, BlakeTwo256, DigestItem};
use version::{RuntimeVersion, ApiId};
use council::{motions as council_motions, voting as council_voting};
#[cfg(any(feature = "std", test))]
use version::NativeVersion;
#[cfg(any(feature = "std", test))]
pub use runtime_primitives::BuildStorage;
@@ -94,6 +96,15 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
apis: apis_vec!([(INHERENT, 1), (VALIDATX, 1)]),
};
/// Native version.
#[cfg(any(feature = "std", test))]
pub fn native_version() -> NativeVersion {
NativeVersion {
runtime_version: VERSION,
can_author_with: Default::default(),
}
}
impl system::Trait for Runtime {
type Origin = Origin;
type Index = Index;