Skip to content

Commit

Permalink
removed redundant imports
Browse files Browse the repository at this point in the history
  • Loading branch information
debris committed Nov 14, 2017
1 parent e6048e4 commit a22c48b
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 38 deletions.
9 changes: 2 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion ethcore/light/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ memorydb = { path = "../../util/memorydb" }
patricia_trie = { path = "../../util/patricia_trie" }
ethcore-network = { path = "../../util/network" }
ethcore-io = { path = "../../util/io" }
ethcore-devtools = { path = "../../devtools" }
evm = { path = "../evm" }
heapsize = "0.4"
vm = { path = "../vm" }
Expand All @@ -39,5 +38,8 @@ kvdb-rocksdb = { path = "../../util/kvdb-rocksdb" }
kvdb-memorydb = { path = "../../util/kvdb-memorydb" }
memory-cache = { path = "../../util/memory_cache" }

[dev-dependencies]
tempdir = "0.3"

[features]
default = []
6 changes: 3 additions & 3 deletions ethcore/light/src/client/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,21 +120,21 @@ impl<T: ChainDataFetcher> IoHandler<ClientIoMessage> for ImportBlocks<T> {
#[cfg(test)]
mod tests {
use super::Service;
use devtools::RandomTempPath;
use ethcore::spec::Spec;

use std::sync::Arc;
use cache::Cache;
use client::fetch;
use time::Duration;
use parking_lot::Mutex;
use tempdir::TempDir;

#[test]
fn it_works() {
let tempdir = TempDir::new("").unwrap();
let spec = Spec::new_test();
let temp_path = RandomTempPath::new();
let cache = Arc::new(Mutex::new(Cache::new(Default::default(), Duration::hours(6))));

Service::start(Default::default(), &spec, fetch::unavailable(), temp_path.as_path(), cache).unwrap();
Service::start(Default::default(), &spec, fetch::unavailable(), tempdir.path(), cache).unwrap();
}
}
2 changes: 1 addition & 1 deletion ethcore/light/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ extern crate kvdb_rocksdb;
extern crate memory_cache;

#[cfg(test)]
extern crate ethcore_devtools as devtools;
extern crate tempdir;
5 changes: 3 additions & 2 deletions ethcore/light/src/net/load_timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,9 @@ mod tests {

#[test]
fn file_store() {
let path = ::devtools::RandomTempPath::new();
let store = FileStore(path.as_path().clone());
let tempdir = ::tempdir::TempDir::new("").unwrap();
let path = tempdir.path().join("file");
let store = FileStore(path);

let mut samples = store.load();
assert!(samples.is_empty());
Expand Down
1 change: 0 additions & 1 deletion ipfs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ authors = ["Parity Technologies <[email protected]>"]

[dependencies]
ethcore = { path = "../ethcore" }
ethcore-util = { path = "../util" }
ethcore-bigint = { path = "../util/bigint" }
ethcore-bytes = { path = "../util/bytes" }
jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.9" }
Expand Down
1 change: 0 additions & 1 deletion ipfs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ extern crate unicase;

extern crate rlp;
extern crate ethcore;
extern crate ethcore_util as util;
extern crate ethcore_bigint as bigint;
extern crate ethcore_bytes as bytes;
extern crate jsonrpc_core as core;
Expand Down
1 change: 0 additions & 1 deletion local-store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ version = "0.1.0"
authors = ["Parity Technologies <[email protected]>"]

[dependencies]
ethcore-util = { path = "../util" }
ethcore-io = { path = "../util/io" }
ethcore = { path = "../ethcore" }
rlp = { path = "../util/rlp" }
Expand Down
1 change: 0 additions & 1 deletion local-store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ use rlp::UntrustedRlp;
use kvdb::KeyValueDB;

extern crate ethcore;
extern crate ethcore_util as util;
extern crate ethcore_io as io;
extern crate rlp;
extern crate serde_json;
Expand Down
4 changes: 3 additions & 1 deletion secret_store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ tokio-proto = "0.1"
url = "1.0"
ethcore = { path = "../ethcore" }
ethcore-bytes = { path = "../util/bytes" }
ethcore-devtools = { path = "../devtools" }
ethcore-util = { path = "../util" }
ethcore-bigint = { path = "../util/bigint" }
kvdb = { path = "../util/kvdb" }
Expand All @@ -35,3 +34,6 @@ ethcrypto = { path = "../ethcrypto" }
ethkey = { path = "../ethkey" }
native-contracts = { path = "../ethcore/native_contracts" }
lazy_static = "0.2"

[dev-dependencies]
tempdir = "0.3"
16 changes: 9 additions & 7 deletions secret_store/src/key_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,12 @@ impl From<SerializableDocumentKeyShareV2> for DocumentKeyShare {

#[cfg(test)]
pub mod tests {
extern crate tempdir;

use std::collections::{BTreeMap, HashMap};
use parking_lot::RwLock;
use serde_json;
use devtools::RandomTempPath;
use self::tempdir::TempDir;
use ethkey::{Random, Generator, Public, Secret};
use kvdb_rocksdb::Database;
use types::all::{Error, NodeAddress, ServiceConfiguration, ClusterConfiguration, ServerKeyId};
Expand Down Expand Up @@ -419,11 +421,11 @@ pub mod tests {

#[test]
fn persistent_key_storage() {
let path = RandomTempPath::create_dir();
let tempdir = TempDir::new("").unwrap();
let config = ServiceConfiguration {
listener_address: None,
acl_check_enabled: true,
data_path: path.as_str().to_owned(),
data_path: tempdir.path().display().to_string(),
cluster_config: ClusterConfiguration {
threads: 1,
listener_address: NodeAddress {
Expand Down Expand Up @@ -482,8 +484,8 @@ pub mod tests {

#[test]
fn upgrade_db_from_0() {
let db_path = RandomTempPath::create_dir();
let db = Database::open_default(db_path.as_str()).unwrap();
let tempdir = TempDir::new("").unwrap();
let db = Database::open_default(&tempdir.path().display().to_string()).unwrap();

// prepare v0 database
{
Expand Down Expand Up @@ -523,8 +525,8 @@ pub mod tests {

#[test]
fn upgrade_db_from_1() {
let db_path = RandomTempPath::create_dir();
let db = Database::open_default(db_path.as_str()).unwrap();
let tempdir = TempDir::new("").unwrap();
let db = Database::open_default(&tempdir.path().display().to_string()).unwrap();

// prepare v1 database
{
Expand Down
1 change: 0 additions & 1 deletion secret_store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ extern crate tokio_proto;
extern crate url;

extern crate ethcore;
extern crate ethcore_devtools as devtools;
extern crate ethcore_bytes as bytes;
extern crate ethcore_util as util;
extern crate ethcore_bigint as bigint;
Expand Down
14 changes: 7 additions & 7 deletions stratum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ license = "GPL-3.0"
authors = ["Parity Technologies <[email protected]>"]

[dependencies]
log = "0.3"
ethcore-bigint = { path = "../util/bigint" }
ethcore-logger = { path = "../logger" }
hash = { path = "../util/hash" }
jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.9" }
jsonrpc-macros = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.9" }
jsonrpc-tcp-server = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.9" }
ethcore-util = { path = "../util" }
ethcore-bigint = { path = "../util/bigint" }
ethcore-devtools = { path = "../devtools" }
log = "0.3"
parking_lot = "0.4"

[dev-dependencies]
env_logger = "0.4"
tokio-core = "0.1"
tokio-io = "0.1"
parking_lot = "0.4"
ethcore-logger = { path = "../logger" }
hash = { path = "../util/hash" }
2 changes: 0 additions & 2 deletions stratum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@ extern crate jsonrpc_tcp_server;
extern crate jsonrpc_core;
extern crate jsonrpc_macros;
#[macro_use] extern crate log;
extern crate ethcore_util as util;
extern crate ethcore_bigint as bigint;
extern crate hash;
extern crate parking_lot;

#[cfg(test)] extern crate tokio_core;
#[cfg(test)] extern crate tokio_io;
#[cfg(test)] extern crate ethcore_logger;
#[cfg(test)] extern crate env_logger;

mod traits;

Expand Down
1 change: 0 additions & 1 deletion sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ ipnetwork = "0.12.6"
[dev-dependencies]
ethkey = { path = "../ethkey" }
kvdb-memorydb = { path = "../util/kvdb-memorydb" }
ethcore-devtools = { path = "../devtools" }

[features]
default = []
Expand Down
1 change: 0 additions & 1 deletion sync/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ extern crate kvdb;

extern crate ethcore_light as light;

#[cfg(test)] extern crate ethcore_devtools as devtools;
#[cfg(test)] extern crate ethkey;
#[cfg(test)] extern crate kvdb_memorydb;

Expand Down

0 comments on commit a22c48b

Please sign in to comment.