finished removing ipc

This commit is contained in:
debris
2017-10-16 18:18:43 +02:00
parent fa019bd03e
commit 16d84f8ecf
54 changed files with 6 additions and 5600 deletions

View File

@@ -5,10 +5,6 @@ license = "GPL-3.0"
name = "ethcore-light"
version = "1.9.0"
authors = ["Parity Technologies <admin@parity.io>"]
build = "build.rs"
[build-dependencies]
"ethcore-ipc-codegen" = { path = "../../ipc/codegen", optional = true }
[dependencies]
log = "0.3"
@@ -20,7 +16,6 @@ memorydb = { path = "../../util/memorydb" }
patricia_trie = { path = "../../util/patricia_trie" }
ethcore-network = { path = "../../util/network" }
ethcore-io = { path = "../../util/io" }
ethcore-ipc = { path = "../../ipc/rpc", optional = true }
ethcore-devtools = { path = "../../devtools" }
evm = { path = "../evm" }
heapsize = "0.4"
@@ -46,4 +41,3 @@ memory-cache = { path = "../../util/memory_cache" }
[features]
default = []
ipc = ["ethcore-ipc", "ethcore-ipc-codegen"]

View File

@@ -1,27 +0,0 @@
// Copyright 2015-2017 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
#[cfg(feature = "ipc")]
extern crate ethcore_ipc_codegen;
#[cfg(feature = "ipc")]
fn main() {
ethcore_ipc_codegen::derive_binary("src/types/mod.rs.in").unwrap();
ethcore_ipc_codegen::derive_ipc_cond("src/provider.rs", true).unwrap();
}
#[cfg(not(feature = "ipc"))]
fn main() { }

View File

@@ -38,21 +38,8 @@ pub mod net;
pub mod on_demand;
pub mod transaction_queue;
pub mod cache;
#[cfg(not(feature = "ipc"))]
pub mod provider;
#[cfg(feature = "ipc")]
pub mod provider {
#![allow(dead_code, unused_assignments, unused_variables, missing_docs)] // codegen issues
include!(concat!(env!("OUT_DIR"), "/provider.rs"));
}
#[cfg(feature = "ipc")]
pub mod remote {
pub use provider::LightProviderClient;
}
mod types;
pub use self::cache::Cache;
@@ -96,8 +83,5 @@ extern crate kvdb_memorydb;
extern crate kvdb_rocksdb;
extern crate memory_cache;
#[cfg(feature = "ipc")]
extern crate ethcore_ipc as ipc;
#[cfg(test)]
extern crate ethcore_devtools as devtools;

View File

@@ -34,7 +34,6 @@ use transaction_queue::TransactionQueue;
use request;
/// Defines the operations that a provider for the light subprotocol must fulfill.
#[cfg_attr(feature = "ipc", ipc(client_ident="LightProviderClient"))]
pub trait Provider: Send + Sync {
/// Provide current blockchain info.
fn chain_info(&self) -> BlockChainInfo;
@@ -328,7 +327,7 @@ impl<L: AsLightClient + Send + Sync> Provider for LightProvider<L> {
}
fn transaction_index(&self, _req: request::CompleteTransactionIndexRequest)
-> Option<request::TransactionIndexResponse>
-> Option<request::TransactionIndexResponse>
{
None
}

View File

@@ -14,11 +14,4 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
//! Types used in the public (IPC) api which require custom code generation.
#![cfg_attr(feature = "ipc", allow(dead_code, unused_assignments, unused_variables))] // codegen issues
#[cfg(feature = "ipc")]
include!(concat!(env!("OUT_DIR"), "/mod.rs.in"));
#[cfg(not(feature = "ipc"))]
include!("mod.rs.in");
pub mod request;

View File

@@ -1,17 +0,0 @@
// Copyright 2015-2017 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
pub mod request;

View File

@@ -204,7 +204,6 @@ pub enum OutputKind {
/// Either a hash or a number.
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "ipc", binary)]
pub enum HashOrNumber {
/// Block hash variant.
Hash(H256),