Migrate node (cli, executor, primitives and runtime) to the 2018 edition (#1589)

This commit is contained in:
Stanislav Tkach
2019-01-29 18:57:56 +02:00
committed by Gav Wood
parent d796e09f02
commit 473721f959
14 changed files with 94 additions and 170 deletions
+38 -37
View File
@@ -2,6 +2,7 @@
name = "node-runtime"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
integer-sqrt = { version = "0.1.2" }
@@ -10,28 +11,28 @@ parity-codec-derive = { version = "3.0" }
parity-codec = { version = "3.0", default-features = false }
substrate-primitives = { path = "../../core/primitives", default-features = false }
substrate-client = { path = "../../core/client", default-features = false }
sr-std = { path = "../../core/sr-std", default-features = false }
sr-primitives = { path = "../../core/sr-primitives", default-features = false }
sr-version = { path = "../../core/sr-version", default-features = false }
rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false }
runtime_primitives = { package = "sr-primitives", path = "../../core/sr-primitives", default-features = false }
version = { package = "sr-version", path = "../../core/sr-version", default-features = false }
srml-support = { path = "../../srml/support", default-features = false }
srml-aura = { path = "../../srml/aura", default-features = false }
srml-balances = { path = "../../srml/balances", default-features = false }
srml-consensus = { path = "../../srml/consensus", default-features = false }
srml-contract = { path = "../../srml/contract", default-features = false }
srml-council = { path = "../../srml/council", default-features = false }
srml-democracy = { path = "../../srml/democracy", default-features = false }
srml-executive = { path = "../../srml/executive", default-features = false }
srml-grandpa = { path = "../../srml/grandpa", default-features = false }
srml-indices = { path = "../../srml/indices", default-features = false }
srml-session = { path = "../../srml/session", default-features = false }
srml-staking = { path = "../../srml/staking", default-features = false }
srml-system = { path = "../../srml/system", default-features = false }
srml-timestamp = { path = "../../srml/timestamp", default-features = false }
srml-treasury = { path = "../../srml/treasury", default-features = false }
srml-sudo = { path = "../../srml/sudo", default-features = false }
aura = { package = "srml-aura", path = "../../srml/aura", default-features = false }
balances = { package = "srml-balances", path = "../../srml/balances", default-features = false }
consensus = { package = "srml-consensus", path = "../../srml/consensus", default-features = false }
contract = { package = "srml-contract", path = "../../srml/contract", default-features = false }
council = { package = "srml-council", path = "../../srml/council", default-features = false }
democracy = { package = "srml-democracy", path = "../../srml/democracy", default-features = false }
executive = { package = "srml-executive", path = "../../srml/executive", default-features = false }
grandpa = { package = "srml-grandpa", path = "../../srml/grandpa", default-features = false }
indices = { package = "srml-indices", path = "../../srml/indices", default-features = false }
session = { package = "srml-session", path = "../../srml/session", default-features = false }
staking = { package = "srml-staking", path = "../../srml/staking", default-features = false }
system = { package = "srml-system", path = "../../srml/system", default-features = false }
timestamp = { package = "srml-timestamp", path = "../../srml/timestamp", default-features = false }
treasury = { package = "srml-treasury", path = "../../srml/treasury", default-features = false }
sudo = { package = "srml-sudo", path = "../../srml/sudo", default-features = false }
srml-upgrade-key = { path = "../../srml/upgrade-key", default-features = false }
node-primitives = { path = "../primitives", default-features = false }
substrate-consensus-aura-primitives = { path = "../../core/consensus/aura/primitives", default-features = false }
consensus_aura = { package = "substrate-consensus-aura-primitives", path = "../../core/consensus/aura/primitives", default-features = false }
rustc-hex = { version = "2.0", optional = true }
hex-literal = { version = "0.1.0", optional = true }
serde = { version = "1.0", optional = true }
@@ -42,30 +43,30 @@ default = ["std"]
std = [
"parity-codec/std",
"substrate-primitives/std",
"sr-std/std",
"sr-primitives/std",
"rstd/std",
"runtime_primitives/std",
"srml-support/std",
"srml-balances/std",
"srml-consensus/std",
"srml-contract/std",
"srml-council/std",
"srml-democracy/std",
"srml-executive/std",
"srml-grandpa/std",
"srml-indices/std",
"srml-session/std",
"srml-staking/std",
"srml-system/std",
"srml-timestamp/std",
"srml-treasury/std",
"srml-sudo/std",
"balances/std",
"consensus/std",
"contract/std",
"council/std",
"democracy/std",
"executive/std",
"grandpa/std",
"indices/std",
"session/std",
"staking/std",
"system/std",
"timestamp/std",
"treasury/std",
"sudo/std",
"srml-upgrade-key/std",
"sr-version/std",
"version/std",
"node-primitives/std",
"serde/std",
"safe-mix/std",
"substrate-client/std",
"substrate-consensus-aura-primitives/std",
"consensus_aura/std",
"rustc-hex",
"hex-literal",
"serde",
+6 -34
View File
@@ -22,48 +22,20 @@
#[macro_use]
extern crate srml_support;
#[macro_use]
extern crate sr_primitives as runtime_primitives;
extern crate substrate_primitives;
#[macro_use]
extern crate substrate_client as client;
#[macro_use]
extern crate parity_codec_derive;
extern crate parity_codec as codec;
extern crate sr_std as rstd;
extern crate srml_aura as aura;
extern crate srml_balances as balances;
extern crate srml_consensus as consensus;
extern crate srml_contract as contract;
extern crate srml_council as council;
extern crate srml_democracy as democracy;
extern crate srml_executive as executive;
extern crate srml_grandpa as grandpa;
extern crate srml_indices as indices;
extern crate srml_session as session;
extern crate srml_staking as staking;
extern crate srml_sudo as sudo;
extern crate srml_system as system;
extern crate srml_timestamp as timestamp;
extern crate srml_treasury as treasury;
#[macro_use]
extern crate sr_version as version;
extern crate node_primitives;
extern crate substrate_consensus_aura_primitives as consensus_aura;
extern crate runtime_primitives;
use rstd::prelude::*;
use parity_codec_derive::{Encode, Decode};
#[cfg(feature = "std")]
use srml_support::{Serialize, Deserialize};
use substrate_primitives::u32_trait::{_2, _4};
use node_primitives::{
AccountId, AccountIndex, Balance, BlockNumber, Hash, Index, SessionKey, Signature
};
use grandpa::fg_primitives::{self, ScheduledChange};
use client::{
use substrate_client::impl_runtime_apis;
use substrate_client::{
block_builder::api::{self as block_builder_api, InherentData, CheckInherentsResult},
runtime_api as client_api,
};
+1
View File
@@ -2,6 +2,7 @@
name = "node-runtime-wasm"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[lib]
name = "node_runtime"
-1
View File
@@ -18,5 +18,4 @@
#![cfg_attr(not(feature = "std"), no_std)]
extern crate node_runtime;
pub use node_runtime::*;