mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 04:51:09 +00:00
Migrate node (cli, executor, primitives and runtime) to the 2018 edition (#1589)
This commit is contained in:
committed by
Gav Wood
parent
d796e09f02
commit
473721f959
@@ -4,35 +4,36 @@ version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "Substrate node implementation in Rust."
|
||||
build = "build.rs"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4"
|
||||
tokio = "0.1.7"
|
||||
futures = "0.1"
|
||||
exit-future = "0.1"
|
||||
substrate-cli = { path = "../../core/cli" }
|
||||
cli = { package = "substrate-cli", path = "../../core/cli" }
|
||||
parity-codec = { version = "3.0" }
|
||||
slog = "^2"
|
||||
sr-io = { path = "../../core/sr-io" }
|
||||
substrate-client = { path = "../../core/client" }
|
||||
substrate-primitives = { path = "../../core/primitives" }
|
||||
substrate-inherents = { path = "../../core/inherents" }
|
||||
client = { package = "substrate-client", path = "../../core/client" }
|
||||
primitives = { package = "substrate-primitives", path = "../../core/primitives" }
|
||||
inherents = { package = "substrate-inherents", path = "../../core/inherents" }
|
||||
node-runtime = { path = "../runtime" }
|
||||
node-primitives = { path = "../primitives" }
|
||||
hex-literal = "0.1"
|
||||
substrate-basic-authorship = { path = "../../core/basic-authorship" }
|
||||
substrate-service = { path = "../../core/service" }
|
||||
substrate-transaction-pool = { path = "../../core/transaction-pool" }
|
||||
substrate-network = { path = "../../core/network" }
|
||||
substrate-consensus-aura = { path = "../../core/consensus/aura" }
|
||||
substrate-finality-grandpa = { path = "../../core/finality-grandpa" }
|
||||
transaction_pool = { package = "substrate-transaction-pool", path = "../../core/transaction-pool" }
|
||||
network = { package = "substrate-network", path = "../../core/network" }
|
||||
consensus = { package = "substrate-consensus-aura", path = "../../core/consensus/aura" }
|
||||
grandpa = { package = "substrate-finality-grandpa", path = "../../core/finality-grandpa" }
|
||||
sr-primitives = { path = "../../core/sr-primitives" }
|
||||
node-executor = { path = "../executor" }
|
||||
substrate-keystore = { path = "../../core/keystore" }
|
||||
|
||||
[dev-dependencies]
|
||||
substrate-service-test = { path = "../../core/service/test" }
|
||||
service-test = { package = "substrate-service-test", path = "../../core/service/test" }
|
||||
|
||||
[build-dependencies]
|
||||
substrate-cli = { path = "../../core/cli" }
|
||||
cli = { package = "substrate-cli", path = "../../core/cli" }
|
||||
structopt = "0.2"
|
||||
|
||||
@@ -14,9 +14,6 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
extern crate substrate_cli as cli;
|
||||
extern crate structopt;
|
||||
|
||||
use cli::{NoCustom, CoreParams};
|
||||
|
||||
use std::{fs, env, path::Path};
|
||||
|
||||
@@ -23,6 +23,7 @@ use node_runtime::{ConsensusConfig, CouncilSeatsConfig, CouncilVotingConfig, Dem
|
||||
SudoConfig, ContractConfig, GrandpaConfig, IndicesConfig, Permill, Perbill};
|
||||
pub use node_runtime::GenesisConfig;
|
||||
use substrate_service;
|
||||
use hex_literal::{hex, hex_impl};
|
||||
|
||||
use substrate_keystore::pad_seed;
|
||||
|
||||
@@ -303,7 +304,7 @@ pub fn local_testnet_config() -> ChainSpec {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use service_test;
|
||||
use service::Factory;
|
||||
use crate::service::Factory;
|
||||
|
||||
fn local_testnet_genesis_instant() -> GenesisConfig {
|
||||
let mut genesis = local_testnet_genesis();
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
//! Initialization errors.
|
||||
|
||||
use client;
|
||||
use error_chain::{
|
||||
error_chain, error_chain_processing, impl_error_chain_processed
|
||||
};
|
||||
|
||||
error_chain! {
|
||||
foreign_links {
|
||||
|
||||
@@ -19,32 +19,6 @@
|
||||
#![warn(missing_docs)]
|
||||
#![warn(unused_extern_crates)]
|
||||
|
||||
extern crate tokio;
|
||||
|
||||
extern crate substrate_cli as cli;
|
||||
extern crate substrate_primitives as primitives;
|
||||
extern crate node_runtime;
|
||||
extern crate exit_future;
|
||||
#[macro_use]
|
||||
extern crate hex_literal;
|
||||
#[cfg(test)]
|
||||
extern crate substrate_service_test as service_test;
|
||||
extern crate substrate_transaction_pool as transaction_pool;
|
||||
#[macro_use]
|
||||
extern crate substrate_network as network;
|
||||
extern crate substrate_consensus_aura as consensus;
|
||||
extern crate substrate_client as client;
|
||||
extern crate substrate_finality_grandpa as grandpa;
|
||||
extern crate node_primitives;
|
||||
#[macro_use]
|
||||
extern crate substrate_service;
|
||||
extern crate node_executor;
|
||||
extern crate substrate_keystore;
|
||||
extern crate substrate_inherents as inherents;
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
pub use cli::error;
|
||||
pub mod chain_spec;
|
||||
mod service;
|
||||
@@ -54,6 +28,7 @@ use tokio::runtime::Runtime;
|
||||
pub use cli::{VersionInfo, IntoExit, NoCustom};
|
||||
use substrate_service::{ServiceFactory, Roles as ServiceRoles};
|
||||
use std::ops::Deref;
|
||||
use log::info;
|
||||
|
||||
/// The chain specification option.
|
||||
#[derive(Clone, Debug)]
|
||||
|
||||
@@ -34,6 +34,9 @@ use substrate_service::{
|
||||
};
|
||||
use transaction_pool::{self, txpool::{Pool as TransactionPool}};
|
||||
use inherents::InherentDataProviders;
|
||||
use network::construct_simple_protocol;
|
||||
use substrate_service::construct_service_factory;
|
||||
use log::info;
|
||||
|
||||
construct_simple_protocol! {
|
||||
/// Demo protocol attachment for substrate.
|
||||
|
||||
Reference in New Issue
Block a user