Remove node-api (#804)

* Remove `node-api` from `node-consensus` and `node-transaction-pool`

* Remove the `node-api` crate and its last usages

* Remove left over file

* Fixes compilation errors

* Switch to `As` trait

* Rename trait

* Whitespace
This commit is contained in:
Bastian Köcher
2018-09-26 18:57:30 +02:00
committed by Gav Wood
parent 58cc0992df
commit 718ba4e159
17 changed files with 255 additions and 318 deletions
-1
View File
@@ -11,7 +11,6 @@ log = "0.3"
slog = "^2"
tokio = "0.1.7"
hex-literal = "0.1"
node-api = { path = "../api" }
node-primitives = { path = "../primitives" }
node-runtime = { path = "../runtime" }
node-executor = { path = "../executor" }
+3 -3
View File
@@ -18,7 +18,6 @@
//! Substrate service. Specialized wrapper over substrate service.
extern crate node_api;
extern crate node_primitives;
extern crate node_runtime;
extern crate node_executor;
@@ -41,11 +40,12 @@ pub mod chain_spec;
use std::sync::Arc;
use transaction_pool::TransactionPool;
use node_api::Api;
use node_primitives::{Block, Hash};
use node_runtime::GenesisConfig;
use client::Client;
use consensus::AuthoringApi;
use node_network::{Protocol as DemoProtocol, consensus::ConsensusNetwork};
use transaction_pool::Client as TPApi;
use tokio::runtime::TaskExecutor;
use service::FactoryFullConfiguration;
use primitives::{Blake2Hasher};
@@ -63,7 +63,7 @@ pub type NetworkService = network::Service<Block, <Factory as service::ServiceFa
/// A collection of type to generalise specific components over full / light client.
pub trait Components: service::Components {
/// Demo API.
type Api: 'static + Api + Send + Sync;
type Api: 'static + AuthoringApi + TPApi + Send + Sync;
/// Client backend.
type Backend: 'static + client::backend::Backend<Block, Blake2Hasher>;
/// Client executor.