removed redundant imports
This commit is contained in:
parent
e6048e4a34
commit
a22c48b6b0
9
Cargo.lock
generated
9
Cargo.lock
generated
@ -586,7 +586,6 @@ dependencies = [
|
|||||||
"ethcore 1.9.0",
|
"ethcore 1.9.0",
|
||||||
"ethcore-bigint 0.2.1",
|
"ethcore-bigint 0.2.1",
|
||||||
"ethcore-bytes 0.1.0",
|
"ethcore-bytes 0.1.0",
|
||||||
"ethcore-devtools 1.9.0",
|
|
||||||
"ethcore-io 1.9.0",
|
"ethcore-io 1.9.0",
|
||||||
"ethcore-network 1.9.0",
|
"ethcore-network 1.9.0",
|
||||||
"ethcore-util 1.9.0",
|
"ethcore-util 1.9.0",
|
||||||
@ -610,6 +609,7 @@ dependencies = [
|
|||||||
"serde_derive 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"smallvec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"smallvec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"stats 0.1.0",
|
"stats 0.1.0",
|
||||||
|
"tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
|
"time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"triehash 0.1.0",
|
"triehash 0.1.0",
|
||||||
"vm 0.1.0",
|
"vm 0.1.0",
|
||||||
@ -673,7 +673,6 @@ dependencies = [
|
|||||||
"ethcore 1.9.0",
|
"ethcore 1.9.0",
|
||||||
"ethcore-bigint 0.2.1",
|
"ethcore-bigint 0.2.1",
|
||||||
"ethcore-bytes 0.1.0",
|
"ethcore-bytes 0.1.0",
|
||||||
"ethcore-devtools 1.9.0",
|
|
||||||
"ethcore-logger 1.9.0",
|
"ethcore-logger 1.9.0",
|
||||||
"ethcore-util 1.9.0",
|
"ethcore-util 1.9.0",
|
||||||
"ethcrypto 0.1.0",
|
"ethcrypto 0.1.0",
|
||||||
@ -692,6 +691,7 @@ dependencies = [
|
|||||||
"serde 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tiny-keccak 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tiny-keccak 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tokio-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tokio-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tokio-io 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tokio-io 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -706,9 +706,7 @@ version = "1.9.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ethcore-bigint 0.2.1",
|
"ethcore-bigint 0.2.1",
|
||||||
"ethcore-devtools 1.9.0",
|
|
||||||
"ethcore-logger 1.9.0",
|
"ethcore-logger 1.9.0",
|
||||||
"ethcore-util 1.9.0",
|
|
||||||
"hash 0.1.0",
|
"hash 0.1.0",
|
||||||
"jsonrpc-core 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.9)",
|
"jsonrpc-core 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.9)",
|
||||||
"jsonrpc-macros 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.9)",
|
"jsonrpc-macros 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.9)",
|
||||||
@ -847,7 +845,6 @@ dependencies = [
|
|||||||
"ethcore 1.9.0",
|
"ethcore 1.9.0",
|
||||||
"ethcore-bigint 0.2.1",
|
"ethcore-bigint 0.2.1",
|
||||||
"ethcore-bytes 0.1.0",
|
"ethcore-bytes 0.1.0",
|
||||||
"ethcore-devtools 1.9.0",
|
|
||||||
"ethcore-io 1.9.0",
|
"ethcore-io 1.9.0",
|
||||||
"ethcore-light 1.9.0",
|
"ethcore-light 1.9.0",
|
||||||
"ethcore-network 1.9.0",
|
"ethcore-network 1.9.0",
|
||||||
@ -2057,7 +2054,6 @@ dependencies = [
|
|||||||
"ethcore 1.9.0",
|
"ethcore 1.9.0",
|
||||||
"ethcore-bigint 0.2.1",
|
"ethcore-bigint 0.2.1",
|
||||||
"ethcore-bytes 0.1.0",
|
"ethcore-bytes 0.1.0",
|
||||||
"ethcore-util 1.9.0",
|
|
||||||
"jsonrpc-core 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.9)",
|
"jsonrpc-core 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.9)",
|
||||||
"jsonrpc-http-server 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.9)",
|
"jsonrpc-http-server 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.9)",
|
||||||
"multihash 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"multihash 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2071,7 +2067,6 @@ version = "0.1.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"ethcore 1.9.0",
|
"ethcore 1.9.0",
|
||||||
"ethcore-io 1.9.0",
|
"ethcore-io 1.9.0",
|
||||||
"ethcore-util 1.9.0",
|
|
||||||
"ethkey 0.2.0",
|
"ethkey 0.2.0",
|
||||||
"kvdb 0.1.0",
|
"kvdb 0.1.0",
|
||||||
"kvdb-memorydb 0.1.0",
|
"kvdb-memorydb 0.1.0",
|
||||||
|
@ -16,7 +16,6 @@ memorydb = { path = "../../util/memorydb" }
|
|||||||
patricia_trie = { path = "../../util/patricia_trie" }
|
patricia_trie = { path = "../../util/patricia_trie" }
|
||||||
ethcore-network = { path = "../../util/network" }
|
ethcore-network = { path = "../../util/network" }
|
||||||
ethcore-io = { path = "../../util/io" }
|
ethcore-io = { path = "../../util/io" }
|
||||||
ethcore-devtools = { path = "../../devtools" }
|
|
||||||
evm = { path = "../evm" }
|
evm = { path = "../evm" }
|
||||||
heapsize = "0.4"
|
heapsize = "0.4"
|
||||||
vm = { path = "../vm" }
|
vm = { path = "../vm" }
|
||||||
@ -39,5 +38,8 @@ kvdb-rocksdb = { path = "../../util/kvdb-rocksdb" }
|
|||||||
kvdb-memorydb = { path = "../../util/kvdb-memorydb" }
|
kvdb-memorydb = { path = "../../util/kvdb-memorydb" }
|
||||||
memory-cache = { path = "../../util/memory_cache" }
|
memory-cache = { path = "../../util/memory_cache" }
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
tempdir = "0.3"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
@ -120,7 +120,6 @@ impl<T: ChainDataFetcher> IoHandler<ClientIoMessage> for ImportBlocks<T> {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::Service;
|
use super::Service;
|
||||||
use devtools::RandomTempPath;
|
|
||||||
use ethcore::spec::Spec;
|
use ethcore::spec::Spec;
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
@ -128,13 +127,14 @@ mod tests {
|
|||||||
use client::fetch;
|
use client::fetch;
|
||||||
use time::Duration;
|
use time::Duration;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
|
use tempdir::TempDir;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn it_works() {
|
fn it_works() {
|
||||||
|
let tempdir = TempDir::new("").unwrap();
|
||||||
let spec = Spec::new_test();
|
let spec = Spec::new_test();
|
||||||
let temp_path = RandomTempPath::new();
|
|
||||||
let cache = Arc::new(Mutex::new(Cache::new(Default::default(), Duration::hours(6))));
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,4 +84,4 @@ extern crate kvdb_rocksdb;
|
|||||||
extern crate memory_cache;
|
extern crate memory_cache;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
extern crate ethcore_devtools as devtools;
|
extern crate tempdir;
|
||||||
|
@ -264,8 +264,9 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn file_store() {
|
fn file_store() {
|
||||||
let path = ::devtools::RandomTempPath::new();
|
let tempdir = ::tempdir::TempDir::new("").unwrap();
|
||||||
let store = FileStore(path.as_path().clone());
|
let path = tempdir.path().join("file");
|
||||||
|
let store = FileStore(path);
|
||||||
|
|
||||||
let mut samples = store.load();
|
let mut samples = store.load();
|
||||||
assert!(samples.is_empty());
|
assert!(samples.is_empty());
|
||||||
|
@ -7,7 +7,6 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ethcore = { path = "../ethcore" }
|
ethcore = { path = "../ethcore" }
|
||||||
ethcore-util = { path = "../util" }
|
|
||||||
ethcore-bigint = { path = "../util/bigint" }
|
ethcore-bigint = { path = "../util/bigint" }
|
||||||
ethcore-bytes = { path = "../util/bytes" }
|
ethcore-bytes = { path = "../util/bytes" }
|
||||||
jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.9" }
|
jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.9" }
|
||||||
|
@ -20,7 +20,6 @@ extern crate unicase;
|
|||||||
|
|
||||||
extern crate rlp;
|
extern crate rlp;
|
||||||
extern crate ethcore;
|
extern crate ethcore;
|
||||||
extern crate ethcore_util as util;
|
|
||||||
extern crate ethcore_bigint as bigint;
|
extern crate ethcore_bigint as bigint;
|
||||||
extern crate ethcore_bytes as bytes;
|
extern crate ethcore_bytes as bytes;
|
||||||
extern crate jsonrpc_core as core;
|
extern crate jsonrpc_core as core;
|
||||||
|
@ -5,7 +5,6 @@ version = "0.1.0"
|
|||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ethcore-util = { path = "../util" }
|
|
||||||
ethcore-io = { path = "../util/io" }
|
ethcore-io = { path = "../util/io" }
|
||||||
ethcore = { path = "../ethcore" }
|
ethcore = { path = "../ethcore" }
|
||||||
rlp = { path = "../util/rlp" }
|
rlp = { path = "../util/rlp" }
|
||||||
|
@ -29,7 +29,6 @@ use rlp::UntrustedRlp;
|
|||||||
use kvdb::KeyValueDB;
|
use kvdb::KeyValueDB;
|
||||||
|
|
||||||
extern crate ethcore;
|
extern crate ethcore;
|
||||||
extern crate ethcore_util as util;
|
|
||||||
extern crate ethcore_io as io;
|
extern crate ethcore_io as io;
|
||||||
extern crate rlp;
|
extern crate rlp;
|
||||||
extern crate serde_json;
|
extern crate serde_json;
|
||||||
|
@ -24,7 +24,6 @@ tokio-proto = "0.1"
|
|||||||
url = "1.0"
|
url = "1.0"
|
||||||
ethcore = { path = "../ethcore" }
|
ethcore = { path = "../ethcore" }
|
||||||
ethcore-bytes = { path = "../util/bytes" }
|
ethcore-bytes = { path = "../util/bytes" }
|
||||||
ethcore-devtools = { path = "../devtools" }
|
|
||||||
ethcore-util = { path = "../util" }
|
ethcore-util = { path = "../util" }
|
||||||
ethcore-bigint = { path = "../util/bigint" }
|
ethcore-bigint = { path = "../util/bigint" }
|
||||||
kvdb = { path = "../util/kvdb" }
|
kvdb = { path = "../util/kvdb" }
|
||||||
@ -35,3 +34,6 @@ ethcrypto = { path = "../ethcrypto" }
|
|||||||
ethkey = { path = "../ethkey" }
|
ethkey = { path = "../ethkey" }
|
||||||
native-contracts = { path = "../ethcore/native_contracts" }
|
native-contracts = { path = "../ethcore/native_contracts" }
|
||||||
lazy_static = "0.2"
|
lazy_static = "0.2"
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
tempdir = "0.3"
|
||||||
|
@ -366,10 +366,12 @@ impl From<SerializableDocumentKeyShareV2> for DocumentKeyShare {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
pub mod tests {
|
pub mod tests {
|
||||||
|
extern crate tempdir;
|
||||||
|
|
||||||
use std::collections::{BTreeMap, HashMap};
|
use std::collections::{BTreeMap, HashMap};
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use serde_json;
|
use serde_json;
|
||||||
use devtools::RandomTempPath;
|
use self::tempdir::TempDir;
|
||||||
use ethkey::{Random, Generator, Public, Secret};
|
use ethkey::{Random, Generator, Public, Secret};
|
||||||
use kvdb_rocksdb::Database;
|
use kvdb_rocksdb::Database;
|
||||||
use types::all::{Error, NodeAddress, ServiceConfiguration, ClusterConfiguration, ServerKeyId};
|
use types::all::{Error, NodeAddress, ServiceConfiguration, ClusterConfiguration, ServerKeyId};
|
||||||
@ -419,11 +421,11 @@ pub mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn persistent_key_storage() {
|
fn persistent_key_storage() {
|
||||||
let path = RandomTempPath::create_dir();
|
let tempdir = TempDir::new("").unwrap();
|
||||||
let config = ServiceConfiguration {
|
let config = ServiceConfiguration {
|
||||||
listener_address: None,
|
listener_address: None,
|
||||||
acl_check_enabled: true,
|
acl_check_enabled: true,
|
||||||
data_path: path.as_str().to_owned(),
|
data_path: tempdir.path().display().to_string(),
|
||||||
cluster_config: ClusterConfiguration {
|
cluster_config: ClusterConfiguration {
|
||||||
threads: 1,
|
threads: 1,
|
||||||
listener_address: NodeAddress {
|
listener_address: NodeAddress {
|
||||||
@ -482,8 +484,8 @@ pub mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn upgrade_db_from_0() {
|
fn upgrade_db_from_0() {
|
||||||
let db_path = RandomTempPath::create_dir();
|
let tempdir = TempDir::new("").unwrap();
|
||||||
let db = Database::open_default(db_path.as_str()).unwrap();
|
let db = Database::open_default(&tempdir.path().display().to_string()).unwrap();
|
||||||
|
|
||||||
// prepare v0 database
|
// prepare v0 database
|
||||||
{
|
{
|
||||||
@ -523,8 +525,8 @@ pub mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn upgrade_db_from_1() {
|
fn upgrade_db_from_1() {
|
||||||
let db_path = RandomTempPath::create_dir();
|
let tempdir = TempDir::new("").unwrap();
|
||||||
let db = Database::open_default(db_path.as_str()).unwrap();
|
let db = Database::open_default(&tempdir.path().display().to_string()).unwrap();
|
||||||
|
|
||||||
// prepare v1 database
|
// prepare v1 database
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,6 @@ extern crate tokio_proto;
|
|||||||
extern crate url;
|
extern crate url;
|
||||||
|
|
||||||
extern crate ethcore;
|
extern crate ethcore;
|
||||||
extern crate ethcore_devtools as devtools;
|
|
||||||
extern crate ethcore_bytes as bytes;
|
extern crate ethcore_bytes as bytes;
|
||||||
extern crate ethcore_util as util;
|
extern crate ethcore_util as util;
|
||||||
extern crate ethcore_bigint as bigint;
|
extern crate ethcore_bigint as bigint;
|
||||||
|
@ -6,16 +6,16 @@ license = "GPL-3.0"
|
|||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
|
|
||||||
[dependencies]
|
[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-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-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" }
|
jsonrpc-tcp-server = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.9" }
|
||||||
ethcore-util = { path = "../util" }
|
log = "0.3"
|
||||||
ethcore-bigint = { path = "../util/bigint" }
|
parking_lot = "0.4"
|
||||||
ethcore-devtools = { path = "../devtools" }
|
|
||||||
|
[dev-dependencies]
|
||||||
env_logger = "0.4"
|
env_logger = "0.4"
|
||||||
tokio-core = "0.1"
|
tokio-core = "0.1"
|
||||||
tokio-io = "0.1"
|
tokio-io = "0.1"
|
||||||
parking_lot = "0.4"
|
|
||||||
ethcore-logger = { path = "../logger" }
|
|
||||||
hash = { path = "../util/hash" }
|
|
||||||
|
@ -20,7 +20,6 @@ extern crate jsonrpc_tcp_server;
|
|||||||
extern crate jsonrpc_core;
|
extern crate jsonrpc_core;
|
||||||
extern crate jsonrpc_macros;
|
extern crate jsonrpc_macros;
|
||||||
#[macro_use] extern crate log;
|
#[macro_use] extern crate log;
|
||||||
extern crate ethcore_util as util;
|
|
||||||
extern crate ethcore_bigint as bigint;
|
extern crate ethcore_bigint as bigint;
|
||||||
extern crate hash;
|
extern crate hash;
|
||||||
extern crate parking_lot;
|
extern crate parking_lot;
|
||||||
@ -28,7 +27,6 @@ extern crate parking_lot;
|
|||||||
#[cfg(test)] extern crate tokio_core;
|
#[cfg(test)] extern crate tokio_core;
|
||||||
#[cfg(test)] extern crate tokio_io;
|
#[cfg(test)] extern crate tokio_io;
|
||||||
#[cfg(test)] extern crate ethcore_logger;
|
#[cfg(test)] extern crate ethcore_logger;
|
||||||
#[cfg(test)] extern crate env_logger;
|
|
||||||
|
|
||||||
mod traits;
|
mod traits;
|
||||||
|
|
||||||
|
@ -34,7 +34,6 @@ ipnetwork = "0.12.6"
|
|||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
ethkey = { path = "../ethkey" }
|
ethkey = { path = "../ethkey" }
|
||||||
kvdb-memorydb = { path = "../util/kvdb-memorydb" }
|
kvdb-memorydb = { path = "../util/kvdb-memorydb" }
|
||||||
ethcore-devtools = { path = "../devtools" }
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
@ -46,7 +46,6 @@ extern crate kvdb;
|
|||||||
|
|
||||||
extern crate ethcore_light as light;
|
extern crate ethcore_light as light;
|
||||||
|
|
||||||
#[cfg(test)] extern crate ethcore_devtools as devtools;
|
|
||||||
#[cfg(test)] extern crate ethkey;
|
#[cfg(test)] extern crate ethkey;
|
||||||
#[cfg(test)] extern crate kvdb_memorydb;
|
#[cfg(test)] extern crate kvdb_memorydb;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user