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
+5 -4
View File
@@ -46,7 +46,8 @@ extern crate parking_lot;
extern crate twox_hash;
extern crate hash_db;
#[macro_use] extern crate log;
#[macro_use]
extern crate log;
#[macro_use]
extern crate lazy_static;
@@ -75,14 +76,14 @@ pub mod error;
pub use wasm_executor::WasmExecutor;
pub use native_executor::{with_native_environment, NativeExecutor, NativeExecutionDispatch};
pub use state_machine::Externalities;
pub use runtime_version::RuntimeVersion;
pub use runtime_version::{RuntimeVersion, NativeVersion};
pub use codec::Codec;
use primitives::Blake2Hasher;
/// Provides runtime information.
pub trait RuntimeInfo {
/// Native runtime information if any.
const NATIVE_VERSION: Option<RuntimeVersion>;
/// Native runtime information.
fn native_version(&self) -> &NativeVersion;
/// Extract RuntimeVersion of given :code block
fn runtime_version<E: Externalities<Blake2Hasher>> (