diff --git a/substrate/Cargo.lock b/substrate/Cargo.lock index c2cbee8e22..d36c73c8c4 100644 --- a/substrate/Cargo.lock +++ b/substrate/Cargo.lock @@ -2370,6 +2370,7 @@ dependencies = [ "substrate-basic-authorship 2.0.0", "substrate-cli 2.0.0", "substrate-client 2.0.0", + "substrate-client-db 2.0.0", "substrate-consensus-babe 2.0.0", "substrate-consensus-babe-primitives 2.0.0", "substrate-consensus-common 2.0.0", @@ -2379,6 +2380,7 @@ dependencies = [ "substrate-keyring 2.0.0", "substrate-keystore 2.0.0", "substrate-network 2.0.0", + "substrate-offchain 2.0.0", "substrate-primitives 2.0.0", "substrate-rpc 2.0.0", "substrate-service 2.0.0", diff --git a/substrate/core/sr-api-macros/tests/ui/declaring_old_block.stderr b/substrate/core/sr-api-macros/tests/ui/declaring_old_block.stderr index 181aa2a3ca..999a50cc96 100644 --- a/substrate/core/sr-api-macros/tests/ui/declaring_old_block.stderr +++ b/substrate/core/sr-api-macros/tests/ui/declaring_old_block.stderr @@ -16,4 +16,4 @@ warning: unused import: `sr_primitives::traits::Block as BlockT` 1 | use sr_primitives::traits::Block as BlockT; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: #[warn(unused_imports)] on by default + = note: `#[warn(unused_imports)]` on by default diff --git a/substrate/core/sr-api-macros/tests/ui/declaring_own_block_with_different_name.stderr b/substrate/core/sr-api-macros/tests/ui/declaring_own_block_with_different_name.stderr index a591d0448c..ec033f2e09 100644 --- a/substrate/core/sr-api-macros/tests/ui/declaring_own_block_with_different_name.stderr +++ b/substrate/core/sr-api-macros/tests/ui/declaring_own_block_with_different_name.stderr @@ -10,4 +10,4 @@ warning: unused import: `sr_primitives::traits::Block as BlockT` 1 | use sr_primitives::traits::Block as BlockT; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: #[warn(unused_imports)] on by default + = note: `#[warn(unused_imports)]` on by default diff --git a/substrate/node/cli/Cargo.toml b/substrate/node/cli/Cargo.toml index 933ee0c046..39ebcb321d 100644 --- a/substrate/node/cli/Cargo.toml +++ b/substrate/node/cli/Cargo.toml @@ -48,6 +48,9 @@ support = { package = "srml-support", path = "../../srml/support", default-featu im_online = { package = "srml-im-online", path = "../../srml/im-online", default-features = false } sr-authority-discovery = { package = "srml-authority-discovery", path = "../../srml/authority-discovery", default-features = false } authority-discovery = { package = "substrate-authority-discovery", path = "../../core/authority-discovery"} +client_db = { package = "substrate-client-db", path = "../../core/client/db", features = ["kvdb-rocksdb"] } +offchain = { package = "substrate-offchain", path = "../../core/offchain" } + [dev-dependencies] keystore = { package = "substrate-keystore", path = "../../core/keystore" } diff --git a/substrate/node/cli/src/service.rs b/substrate/node/cli/src/service.rs index 58d94119b5..4a5f7eab86 100644 --- a/substrate/node/cli/src/service.rs +++ b/substrate/node/cli/src/service.rs @@ -33,6 +33,16 @@ use transaction_pool::{self, txpool::{Pool as TransactionPool}}; use inherents::InherentDataProviders; use network::construct_simple_protocol; +use substrate_service::{NewService, NetworkStatus}; +use client::{Client, LocalCallExecutor}; +use client_db::Backend; +use sr_primitives::traits::Block as BlockT; +use node_executor::NativeExecutor; +use network::NetworkService; +use offchain::OffchainWorkers; +use transaction_pool::ChainApi; +use primitives::Blake2Hasher; + construct_simple_protocol! { /// Demo protocol attachment for substrate. pub struct NodeProtocol where Block = Block { } @@ -215,9 +225,39 @@ macro_rules! new_full { }} } +#[allow(dead_code)] +type ConcreteBlock = node_primitives::Block; +#[allow(dead_code)] +type ConcreteClient = + Client< + Backend, + LocalCallExecutor, + NativeExecutor>, + ConcreteBlock, + node_runtime::RuntimeApi + >; +#[allow(dead_code)] +type ConcreteBackend = Backend; + /// Builds a new service for a full client. pub fn new_full(config: Configuration) --> Result { +-> Result< + NewService< + ConcreteBlock, + ConcreteClient, + LongestChain, + NetworkStatus, + NetworkService::Hash>, + TransactionPool>, + OffchainWorkers< + ConcreteClient, + >::OffchainStorage, + ConcreteBlock, + > + >, + ServiceError, +> +{ new_full!(config).map(|(service, _)| service) }