remove re-export of parking_lot in util (#6435)
This commit is contained in:
		
							parent
							
								
									1d95fe481f
								
							
						
					
					
						commit
						7b8af30590
					
				
							
								
								
									
										11
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										11
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							@ -530,6 +530,7 @@ dependencies = [
 | 
				
			|||||||
 "native-contracts 0.1.0",
 | 
					 "native-contracts 0.1.0",
 | 
				
			||||||
 "num 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "num 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "num_cpus 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "num_cpus 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 | 
					 "parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "price-info 1.7.0",
 | 
					 "price-info 1.7.0",
 | 
				
			||||||
 "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "rlp 0.2.0",
 | 
					 "rlp 0.2.0",
 | 
				
			||||||
@ -662,6 +663,7 @@ dependencies = [
 | 
				
			|||||||
 "heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "itertools 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "itertools 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 | 
					 "parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "rlp 0.2.0",
 | 
					 "rlp 0.2.0",
 | 
				
			||||||
 "rlp_derive 0.1.0",
 | 
					 "rlp_derive 0.1.0",
 | 
				
			||||||
@ -771,6 +773,7 @@ dependencies = [
 | 
				
			|||||||
 "jsonrpc-tcp-server 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)",
 | 
					 "jsonrpc-tcp-server 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)",
 | 
				
			||||||
 "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 | 
					 "parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "tokio-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "tokio-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
@ -937,6 +940,7 @@ dependencies = [
 | 
				
			|||||||
 "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "parity-wasm 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "parity-wasm 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 | 
					 "parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "rlp 0.2.0",
 | 
					 "rlp 0.2.0",
 | 
				
			||||||
 "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "vm 0.1.0",
 | 
					 "vm 0.1.0",
 | 
				
			||||||
@ -1650,6 +1654,7 @@ dependencies = [
 | 
				
			|||||||
 "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "native-contracts 0.1.0",
 | 
					 "native-contracts 0.1.0",
 | 
				
			||||||
 | 
					 "parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
@ -1890,6 +1895,7 @@ dependencies = [
 | 
				
			|||||||
 "parity-rpc-client 1.4.0",
 | 
					 "parity-rpc-client 1.4.0",
 | 
				
			||||||
 "parity-updater 1.8.0",
 | 
					 "parity-updater 1.8.0",
 | 
				
			||||||
 "parity-whisper 0.1.0",
 | 
					 "parity-whisper 0.1.0",
 | 
				
			||||||
 | 
					 "parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "path 0.1.0",
 | 
					 "path 0.1.0",
 | 
				
			||||||
 "pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
@ -1932,6 +1938,7 @@ dependencies = [
 | 
				
			|||||||
 "parity-hash-fetch 1.8.0",
 | 
					 "parity-hash-fetch 1.8.0",
 | 
				
			||||||
 "parity-reactor 0.1.0",
 | 
					 "parity-reactor 0.1.0",
 | 
				
			||||||
 "parity-ui 1.8.0",
 | 
					 "parity-ui 1.8.0",
 | 
				
			||||||
 | 
					 "parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
@ -1971,6 +1978,7 @@ dependencies = [
 | 
				
			|||||||
 "mime_guess 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "mime_guess 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "native-contracts 0.1.0",
 | 
					 "native-contracts 0.1.0",
 | 
				
			||||||
 "parity-reactor 0.1.0",
 | 
					 "parity-reactor 0.1.0",
 | 
				
			||||||
 | 
					 "parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
@ -2049,6 +2057,7 @@ dependencies = [
 | 
				
			|||||||
 "order-stat 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "order-stat 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "parity-reactor 0.1.0",
 | 
					 "parity-reactor 0.1.0",
 | 
				
			||||||
 "parity-updater 1.8.0",
 | 
					 "parity-updater 1.8.0",
 | 
				
			||||||
 | 
					 "parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "rlp 0.2.0",
 | 
					 "rlp 0.2.0",
 | 
				
			||||||
@ -2077,6 +2086,7 @@ dependencies = [
 | 
				
			|||||||
 "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "parity-rpc 1.8.0",
 | 
					 "parity-rpc 1.8.0",
 | 
				
			||||||
 | 
					 "parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
@ -2140,6 +2150,7 @@ dependencies = [
 | 
				
			|||||||
 "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "parity-hash-fetch 1.8.0",
 | 
					 "parity-hash-fetch 1.8.0",
 | 
				
			||||||
 "parity-reactor 0.1.0",
 | 
					 "parity-reactor 0.1.0",
 | 
				
			||||||
 | 
					 "parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
 "path 0.1.0",
 | 
					 "path 0.1.0",
 | 
				
			||||||
 "target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
					 "target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
				
			|||||||
@ -17,6 +17,7 @@ number_prefix = "0.2"
 | 
				
			|||||||
rpassword = "0.2.1"
 | 
					rpassword = "0.2.1"
 | 
				
			||||||
semver = "0.6"
 | 
					semver = "0.6"
 | 
				
			||||||
ansi_term = "0.9"
 | 
					ansi_term = "0.9"
 | 
				
			||||||
 | 
					parking_lot = "0.4"
 | 
				
			||||||
regex = "0.2"
 | 
					regex = "0.2"
 | 
				
			||||||
isatty = "0.1"
 | 
					isatty = "0.1"
 | 
				
			||||||
toml = "0.4"
 | 
					toml = "0.4"
 | 
				
			||||||
 | 
				
			|||||||
@ -13,6 +13,7 @@ futures = "0.1"
 | 
				
			|||||||
linked-hash-map = "0.3"
 | 
					linked-hash-map = "0.3"
 | 
				
			||||||
log = "0.3"
 | 
					log = "0.3"
 | 
				
			||||||
parity-dapps-glue = "1.7"
 | 
					parity-dapps-glue = "1.7"
 | 
				
			||||||
 | 
					parking_lot = "0.4"
 | 
				
			||||||
mime = "0.2"
 | 
					mime = "0.2"
 | 
				
			||||||
mime_guess = "1.6.1"
 | 
					mime_guess = "1.6.1"
 | 
				
			||||||
rand = "0.3"
 | 
					rand = "0.3"
 | 
				
			||||||
 | 
				
			|||||||
@ -32,7 +32,7 @@ use hyper;
 | 
				
			|||||||
use hyper::status::StatusCode;
 | 
					use hyper::status::StatusCode;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use {Embeddable, SyncStatus, random_filename};
 | 
					use {Embeddable, SyncStatus, random_filename};
 | 
				
			||||||
use util::Mutex;
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
use page::LocalPageEndpoint;
 | 
					use page::LocalPageEndpoint;
 | 
				
			||||||
use handlers::{ContentHandler, ContentFetcherHandler};
 | 
					use handlers::{ContentHandler, ContentFetcherHandler};
 | 
				
			||||||
use endpoint::{Endpoint, EndpointPath, Handler};
 | 
					use endpoint::{Endpoint, EndpointPath, Handler};
 | 
				
			||||||
 | 
				
			|||||||
@ -23,7 +23,7 @@ use std::time::{Instant, Duration};
 | 
				
			|||||||
use fetch::{self, Fetch};
 | 
					use fetch::{self, Fetch};
 | 
				
			||||||
use futures::Future;
 | 
					use futures::Future;
 | 
				
			||||||
use parity_reactor::Remote;
 | 
					use parity_reactor::Remote;
 | 
				
			||||||
use util::Mutex;
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use hyper::{server, Decoder, Encoder, Next, Method, Control};
 | 
					use hyper::{server, Decoder, Encoder, Next, Method, Control};
 | 
				
			||||||
use hyper::net::HttpStream;
 | 
					use hyper::net::HttpStream;
 | 
				
			||||||
 | 
				
			|||||||
@ -24,6 +24,7 @@ extern crate futures;
 | 
				
			|||||||
extern crate itertools;
 | 
					extern crate itertools;
 | 
				
			||||||
extern crate linked_hash_map;
 | 
					extern crate linked_hash_map;
 | 
				
			||||||
extern crate mime_guess;
 | 
					extern crate mime_guess;
 | 
				
			||||||
 | 
					extern crate parking_lot;
 | 
				
			||||||
extern crate rand;
 | 
					extern crate rand;
 | 
				
			||||||
extern crate rustc_hex;
 | 
					extern crate rustc_hex;
 | 
				
			||||||
extern crate serde;
 | 
					extern crate serde;
 | 
				
			||||||
@ -73,7 +74,7 @@ use std::collections::HashMap;
 | 
				
			|||||||
use std::mem;
 | 
					use std::mem;
 | 
				
			||||||
use std::path::PathBuf;
 | 
					use std::path::PathBuf;
 | 
				
			||||||
use std::sync::Arc;
 | 
					use std::sync::Arc;
 | 
				
			||||||
use util::RwLock;
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use jsonrpc_http_server::{self as http, hyper, Origin};
 | 
					use jsonrpc_http_server::{self as http, hyper, Origin};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -16,7 +16,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use std::{io, thread, time};
 | 
					use std::{io, thread, time};
 | 
				
			||||||
use std::sync::{atomic, mpsc, Arc};
 | 
					use std::sync::{atomic, mpsc, Arc};
 | 
				
			||||||
use util::Mutex;
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use futures::{self, Future};
 | 
					use futures::{self, Future};
 | 
				
			||||||
use fetch::{self, Fetch};
 | 
					use fetch::{self, Fetch};
 | 
				
			||||||
 | 
				
			|||||||
@ -20,7 +20,8 @@ use std::collections::HashMap;
 | 
				
			|||||||
use rustc_hex::FromHex;
 | 
					use rustc_hex::FromHex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use hash_fetch::urlhint::ContractClient;
 | 
					use hash_fetch::urlhint::ContractClient;
 | 
				
			||||||
use util::{Bytes, Address, Mutex, H256, ToPretty};
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					use util::{Bytes, Address, H256, ToPretty};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const REGISTRAR: &'static str = "8e4e9b13d4b45cb0befc93c3061b1408f67316b2";
 | 
					const REGISTRAR: &'static str = "8e4e9b13d4b45cb0befc93c3061b1408f67316b2";
 | 
				
			||||||
const URLHINT: &'static str = "deadbeefcafe0000000000000000000000000000";
 | 
					const URLHINT: &'static str = "deadbeefcafe0000000000000000000000000000";
 | 
				
			||||||
 | 
				
			|||||||
@ -46,6 +46,7 @@ lru-cache = "0.1.0"
 | 
				
			|||||||
native-contracts = { path = "native_contracts" }
 | 
					native-contracts = { path = "native_contracts" }
 | 
				
			||||||
num = "0.1"
 | 
					num = "0.1"
 | 
				
			||||||
num_cpus = "1.2"
 | 
					num_cpus = "1.2"
 | 
				
			||||||
 | 
					parking_lot = "0.4"
 | 
				
			||||||
price-info = { path = "../price-info" }
 | 
					price-info = { path = "../price-info" }
 | 
				
			||||||
rand = "0.3"
 | 
					rand = "0.3"
 | 
				
			||||||
rlp = { path = "../util/rlp" }
 | 
					rlp = { path = "../util/rlp" }
 | 
				
			||||||
 | 
				
			|||||||
@ -16,6 +16,7 @@ log = "0.3"
 | 
				
			|||||||
rlp = { path = "../../util/rlp" }
 | 
					rlp = { path = "../../util/rlp" }
 | 
				
			||||||
vm = { path = "../vm" }
 | 
					vm = { path = "../vm" }
 | 
				
			||||||
parity-wasm = "0.12"
 | 
					parity-wasm = "0.12"
 | 
				
			||||||
 | 
					parking_lot = "0.4"
 | 
				
			||||||
ethcore-logger = { path = "../../logger" }
 | 
					ethcore-logger = { path = "../../logger" }
 | 
				
			||||||
wasm-utils = { git = "https://github.com/paritytech/wasm-utils" }
 | 
					wasm-utils = { git = "https://github.com/paritytech/wasm-utils" }
 | 
				
			||||||
hash = { path = "../../util/hash" }
 | 
					hash = { path = "../../util/hash" }
 | 
				
			||||||
 | 
				
			|||||||
@ -17,7 +17,8 @@
 | 
				
			|||||||
use std::sync::Arc;
 | 
					use std::sync::Arc;
 | 
				
			||||||
use hash::KECCAK_EMPTY;
 | 
					use hash::KECCAK_EMPTY;
 | 
				
			||||||
use heapsize::HeapSizeOf;
 | 
					use heapsize::HeapSizeOf;
 | 
				
			||||||
use util::{H256, Mutex};
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					use util::H256;
 | 
				
			||||||
use util::cache::MemoryLruCache;
 | 
					use util::cache::MemoryLruCache;
 | 
				
			||||||
use bit_set::BitSet;
 | 
					use bit_set::BitSet;
 | 
				
			||||||
use super::super::instructions;
 | 
					use super::super::instructions;
 | 
				
			||||||
 | 
				
			|||||||
@ -23,6 +23,7 @@ extern crate ethcore_util as util;
 | 
				
			|||||||
extern crate ethjson;
 | 
					extern crate ethjson;
 | 
				
			||||||
extern crate rlp;
 | 
					extern crate rlp;
 | 
				
			||||||
extern crate parity_wasm;
 | 
					extern crate parity_wasm;
 | 
				
			||||||
 | 
					extern crate parking_lot;
 | 
				
			||||||
extern crate wasm_utils;
 | 
					extern crate wasm_utils;
 | 
				
			||||||
extern crate ethcore_logger;
 | 
					extern crate ethcore_logger;
 | 
				
			||||||
extern crate heapsize;
 | 
					extern crate heapsize;
 | 
				
			||||||
 | 
				
			|||||||
@ -31,6 +31,7 @@ itertools = "0.5"
 | 
				
			|||||||
bincode = "0.8.0"
 | 
					bincode = "0.8.0"
 | 
				
			||||||
serde = "1.0"
 | 
					serde = "1.0"
 | 
				
			||||||
serde_derive = "1.0"
 | 
					serde_derive = "1.0"
 | 
				
			||||||
 | 
					parking_lot = "0.4"
 | 
				
			||||||
stats = { path = "../../util/stats" }
 | 
					stats = { path = "../../util/stats" }
 | 
				
			||||||
hash = { path = "../../util/hash" }
 | 
					hash = { path = "../../util/hash" }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -37,11 +37,11 @@ use ethcore::ids::BlockId;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use rlp::{Encodable, Decodable, DecoderError, RlpStream, Rlp, UntrustedRlp};
 | 
					use rlp::{Encodable, Decodable, DecoderError, RlpStream, Rlp, UntrustedRlp};
 | 
				
			||||||
use heapsize::HeapSizeOf;
 | 
					use heapsize::HeapSizeOf;
 | 
				
			||||||
use util::{H256, U256, RwLock};
 | 
					use util::{H256, U256};
 | 
				
			||||||
use util::kvdb::{DBTransaction, KeyValueDB};
 | 
					use util::kvdb::{DBTransaction, KeyValueDB};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use cache::Cache;
 | 
					use cache::Cache;
 | 
				
			||||||
use util::Mutex;
 | 
					use parking_lot::{Mutex, RwLock};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use smallvec::SmallVec;
 | 
					use smallvec::SmallVec;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -555,7 +555,7 @@ mod tests {
 | 
				
			|||||||
  	use cache::Cache;
 | 
					  	use cache::Cache;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	use time::Duration;
 | 
						use time::Duration;
 | 
				
			||||||
	use util::Mutex;
 | 
						use parking_lot::Mutex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	fn make_db() -> Arc<::util::KeyValueDB> {
 | 
						fn make_db() -> Arc<::util::KeyValueDB> {
 | 
				
			||||||
		Arc::new(::util::kvdb::in_memory(0))
 | 
							Arc::new(::util::kvdb::in_memory(0))
 | 
				
			||||||
 | 
				
			|||||||
@ -30,8 +30,9 @@ use ethcore::spec::Spec;
 | 
				
			|||||||
use ethcore::service::ClientIoMessage;
 | 
					use ethcore::service::ClientIoMessage;
 | 
				
			||||||
use ethcore::encoded;
 | 
					use ethcore::encoded;
 | 
				
			||||||
use io::IoChannel;
 | 
					use io::IoChannel;
 | 
				
			||||||
 | 
					use parking_lot::{Mutex, RwLock};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use util::{H256, U256, Mutex, RwLock};
 | 
					use util::{H256, U256};
 | 
				
			||||||
use util::kvdb::{KeyValueDB, CompactionProfile};
 | 
					use util::kvdb::{KeyValueDB, CompactionProfile};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use self::header_chain::{AncestryIter, HeaderChain};
 | 
					use self::header_chain::{AncestryIter, HeaderChain};
 | 
				
			||||||
 | 
				
			|||||||
@ -28,7 +28,7 @@ use io::{IoContext, IoError, IoHandler, IoService};
 | 
				
			|||||||
use util::kvdb::{Database, DatabaseConfig};
 | 
					use util::kvdb::{Database, DatabaseConfig};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use cache::Cache;
 | 
					use cache::Cache;
 | 
				
			||||||
use util::Mutex;
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use super::{Client, Config as ClientConfig};
 | 
					use super::{Client, Config as ClientConfig};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -121,7 +121,7 @@ mod tests {
 | 
				
			|||||||
	use std::sync::Arc;
 | 
						use std::sync::Arc;
 | 
				
			||||||
	use cache::Cache;
 | 
						use cache::Cache;
 | 
				
			||||||
	use time::Duration;
 | 
						use time::Duration;
 | 
				
			||||||
	use util::Mutex;
 | 
						use parking_lot::Mutex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	#[test]
 | 
						#[test]
 | 
				
			||||||
	fn it_works() {
 | 
						fn it_works() {
 | 
				
			||||||
 | 
				
			|||||||
@ -77,6 +77,7 @@ extern crate futures;
 | 
				
			|||||||
extern crate itertools;
 | 
					extern crate itertools;
 | 
				
			||||||
extern crate rand;
 | 
					extern crate rand;
 | 
				
			||||||
extern crate rlp;
 | 
					extern crate rlp;
 | 
				
			||||||
 | 
					extern crate parking_lot;
 | 
				
			||||||
#[macro_use]
 | 
					#[macro_use]
 | 
				
			||||||
extern crate rlp_derive;
 | 
					extern crate rlp_derive;
 | 
				
			||||||
extern crate serde;
 | 
					extern crate serde;
 | 
				
			||||||
 | 
				
			|||||||
@ -32,7 +32,7 @@ use request::{CompleteRequest, Kind};
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use bincode;
 | 
					use bincode;
 | 
				
			||||||
use time;
 | 
					use time;
 | 
				
			||||||
use util::{RwLock, Mutex};
 | 
					use parking_lot::{RwLock, Mutex};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Number of time periods samples should be kept for.
 | 
					/// Number of time periods samples should be kept for.
 | 
				
			||||||
pub const MOVING_SAMPLE_SIZE: usize = 256;
 | 
					pub const MOVING_SAMPLE_SIZE: usize = 256;
 | 
				
			||||||
 | 
				
			|||||||
@ -24,7 +24,8 @@ use io::TimerToken;
 | 
				
			|||||||
use network::{HostInfo, NetworkProtocolHandler, NetworkContext, PeerId};
 | 
					use network::{HostInfo, NetworkProtocolHandler, NetworkContext, PeerId};
 | 
				
			||||||
use rlp::{RlpStream, UntrustedRlp};
 | 
					use rlp::{RlpStream, UntrustedRlp};
 | 
				
			||||||
use util::hash::H256;
 | 
					use util::hash::H256;
 | 
				
			||||||
use util::{DBValue, Mutex, RwLock, U256};
 | 
					use util::{DBValue, U256};
 | 
				
			||||||
 | 
					use parking_lot::{Mutex, RwLock};
 | 
				
			||||||
use time::{Duration, SteadyTime};
 | 
					use time::{Duration, SteadyTime};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use std::collections::{HashMap, HashSet};
 | 
					use std::collections::{HashMap, HashSet};
 | 
				
			||||||
@ -287,7 +288,7 @@ pub type PeerMap = HashMap<PeerId, Mutex<Peer>>;
 | 
				
			|||||||
mod id_guard {
 | 
					mod id_guard {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	use network::PeerId;
 | 
						use network::PeerId;
 | 
				
			||||||
	use util::RwLockReadGuard;
 | 
						use parking_lot::RwLockReadGuard;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	use super::{PeerMap, ReqId};
 | 
						use super::{PeerMap, ReqId};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -606,7 +606,7 @@ fn id_guard() {
 | 
				
			|||||||
	pending_requests.insert(req_id_1, req.clone(), 0.into(), ::time::SteadyTime::now());
 | 
						pending_requests.insert(req_id_1, req.clone(), 0.into(), ::time::SteadyTime::now());
 | 
				
			||||||
	pending_requests.insert(req_id_2, req, 1.into(), ::time::SteadyTime::now());
 | 
						pending_requests.insert(req_id_2, req, 1.into(), ::time::SteadyTime::now());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	proto.peers.write().insert(peer_id, ::util::Mutex::new(Peer {
 | 
						proto.peers.write().insert(peer_id, ::parking_lot::Mutex::new(Peer {
 | 
				
			||||||
		local_credits: flow_params.create_credits(),
 | 
							local_credits: flow_params.create_credits(),
 | 
				
			||||||
		status: status(provider.client.chain_info()),
 | 
							status: status(provider.client.chain_info()),
 | 
				
			||||||
		capabilities: capabilities.clone(),
 | 
							capabilities: capabilities.clone(),
 | 
				
			||||||
 | 
				
			|||||||
@ -27,7 +27,7 @@ use ethcore::executed::{Executed, ExecutionError};
 | 
				
			|||||||
use futures::{Async, Poll, Future};
 | 
					use futures::{Async, Poll, Future};
 | 
				
			||||||
use futures::sync::oneshot::{self, Sender, Receiver, Canceled};
 | 
					use futures::sync::oneshot::{self, Sender, Receiver, Canceled};
 | 
				
			||||||
use network::PeerId;
 | 
					use network::PeerId;
 | 
				
			||||||
use util::{RwLock, Mutex};
 | 
					use parking_lot::{RwLock, Mutex};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use net::{
 | 
					use net::{
 | 
				
			||||||
	self, Handler, PeerStatus, Status, Capabilities,
 | 
						self, Handler, PeerStatus, Status, Capabilities,
 | 
				
			||||||
 | 
				
			|||||||
@ -30,7 +30,8 @@ use hash::{KECCAK_NULL_RLP, KECCAK_EMPTY, KECCAK_EMPTY_LIST_RLP, keccak};
 | 
				
			|||||||
use request::{self as net_request, IncompleteRequest, CompleteRequest, Output, OutputKind, Field};
 | 
					use request::{self as net_request, IncompleteRequest, CompleteRequest, Output, OutputKind, Field};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use rlp::{RlpStream, UntrustedRlp};
 | 
					use rlp::{RlpStream, UntrustedRlp};
 | 
				
			||||||
use util::{Address, Bytes, DBValue, HashDB, Mutex, H256, U256};
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					use util::{Address, Bytes, DBValue, HashDB, H256, U256};
 | 
				
			||||||
use util::memorydb::MemoryDB;
 | 
					use util::memorydb::MemoryDB;
 | 
				
			||||||
use util::trie::{Trie, TrieDB, TrieError};
 | 
					use util::trie::{Trie, TrieDB, TrieError};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -850,7 +851,8 @@ impl TransactionProof {
 | 
				
			|||||||
#[cfg(test)]
 | 
					#[cfg(test)]
 | 
				
			||||||
mod tests {
 | 
					mod tests {
 | 
				
			||||||
	use super::*;
 | 
						use super::*;
 | 
				
			||||||
	use util::{MemoryDB, Address, Mutex, H256};
 | 
						use parking_lot::Mutex;
 | 
				
			||||||
 | 
						use util::{MemoryDB, Address, H256};
 | 
				
			||||||
	use util::trie::{Trie, TrieMut, SecTrieDB, SecTrieDBMut};
 | 
						use util::trie::{Trie, TrieMut, SecTrieDB, SecTrieDBMut};
 | 
				
			||||||
	use util::trie::recorder::Recorder;
 | 
						use util::trie::recorder::Recorder;
 | 
				
			||||||
	use hash::keccak;
 | 
						use hash::keccak;
 | 
				
			||||||
 | 
				
			|||||||
@ -22,7 +22,8 @@ use ethcore::header::{Header, Seal};
 | 
				
			|||||||
use futures::Future;
 | 
					use futures::Future;
 | 
				
			||||||
use network::{PeerId, NodeId};
 | 
					use network::{PeerId, NodeId};
 | 
				
			||||||
use net::*;
 | 
					use net::*;
 | 
				
			||||||
use util::{H256, Mutex};
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					use util::H256;
 | 
				
			||||||
use time::Duration;
 | 
					use time::Duration;
 | 
				
			||||||
use ::request::{self as basic_request, Response};
 | 
					use ::request::{self as basic_request, Response};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -24,7 +24,8 @@ use ethcore::client::{BlockChainClient, ProvingBlockChainClient};
 | 
				
			|||||||
use ethcore::transaction::PendingTransaction;
 | 
					use ethcore::transaction::PendingTransaction;
 | 
				
			||||||
use ethcore::ids::BlockId;
 | 
					use ethcore::ids::BlockId;
 | 
				
			||||||
use ethcore::encoded;
 | 
					use ethcore::encoded;
 | 
				
			||||||
use util::{RwLock, H256};
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
 | 
					use util::H256;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use cht::{self, BlockInfo};
 | 
					use cht::{self, BlockInfo};
 | 
				
			||||||
use client::{LightChainClient, AsLightClient};
 | 
					use client::{LightChainClient, AsLightClient};
 | 
				
			||||||
 | 
				
			|||||||
@ -14,3 +14,4 @@ ethcore-network = { path = "../../util/network" }
 | 
				
			|||||||
native-contracts = { path = "../native_contracts" }
 | 
					native-contracts = { path = "../native_contracts" }
 | 
				
			||||||
futures = "0.1"
 | 
					futures = "0.1"
 | 
				
			||||||
log = "0.3"
 | 
					log = "0.3"
 | 
				
			||||||
 | 
					parking_lot = "0.4"
 | 
				
			||||||
 | 
				
			|||||||
@ -21,6 +21,7 @@ extern crate ethcore_util as util;
 | 
				
			|||||||
extern crate ethcore_network as network;
 | 
					extern crate ethcore_network as network;
 | 
				
			||||||
extern crate native_contracts;
 | 
					extern crate native_contracts;
 | 
				
			||||||
extern crate futures;
 | 
					extern crate futures;
 | 
				
			||||||
 | 
					extern crate parking_lot;
 | 
				
			||||||
#[cfg(test)] extern crate ethcore_io as io;
 | 
					#[cfg(test)] extern crate ethcore_io as io;
 | 
				
			||||||
#[macro_use] extern crate log;
 | 
					#[macro_use] extern crate log;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -29,7 +30,8 @@ use std::collections::HashMap;
 | 
				
			|||||||
use native_contracts::PeerSet as Contract;
 | 
					use native_contracts::PeerSet as Contract;
 | 
				
			||||||
use network::{NodeId, ConnectionFilter, ConnectionDirection};
 | 
					use network::{NodeId, ConnectionFilter, ConnectionDirection};
 | 
				
			||||||
use ethcore::client::{BlockChainClient, BlockId, ChainNotify};
 | 
					use ethcore::client::{BlockChainClient, BlockId, ChainNotify};
 | 
				
			||||||
use util::{Mutex, Address, H256, Bytes};
 | 
					use util::{Address, H256, Bytes};
 | 
				
			||||||
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
use futures::Future;
 | 
					use futures::Future;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const MAX_CACHE_SIZE: usize = 4096;
 | 
					const MAX_CACHE_SIZE: usize = 4096;
 | 
				
			||||||
 | 
				
			|||||||
@ -23,7 +23,7 @@ use self::stores::{AddressBook, DappsSettingsStore, NewDappsPolicy};
 | 
				
			|||||||
use std::fmt;
 | 
					use std::fmt;
 | 
				
			||||||
use std::collections::{HashMap, HashSet};
 | 
					use std::collections::{HashMap, HashSet};
 | 
				
			||||||
use std::time::{Instant, Duration};
 | 
					use std::time::{Instant, Duration};
 | 
				
			||||||
use util::{RwLock};
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
use ethstore::{
 | 
					use ethstore::{
 | 
				
			||||||
	SimpleSecretStore, SecretStore, Error as SSError, EthStore, EthMultiStore,
 | 
						SimpleSecretStore, SecretStore, Error as SSError, EthStore, EthMultiStore,
 | 
				
			||||||
	random_string, SecretVaultRef, StoreAccountRef, OpaqueSecret,
 | 
						random_string, SecretVaultRef, StoreAccountRef, OpaqueSecret,
 | 
				
			||||||
 | 
				
			|||||||
@ -22,6 +22,7 @@ use std::mem;
 | 
				
			|||||||
use itertools::Itertools;
 | 
					use itertools::Itertools;
 | 
				
			||||||
use bloomchain as bc;
 | 
					use bloomchain as bc;
 | 
				
			||||||
use heapsize::HeapSizeOf;
 | 
					use heapsize::HeapSizeOf;
 | 
				
			||||||
 | 
					use parking_lot::{Mutex, RwLock};
 | 
				
			||||||
use util::*;
 | 
					use util::*;
 | 
				
			||||||
use rlp::*;
 | 
					use rlp::*;
 | 
				
			||||||
use header::*;
 | 
					use header::*;
 | 
				
			||||||
 | 
				
			|||||||
@ -23,7 +23,7 @@ use engines::{Engine, EpochVerifier};
 | 
				
			|||||||
use header::Header;
 | 
					use header::Header;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use rand::Rng;
 | 
					use rand::Rng;
 | 
				
			||||||
use util::RwLock;
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// do "heavy" verification on ~1/50 blocks, randomly sampled.
 | 
					// do "heavy" verification on ~1/50 blocks, randomly sampled.
 | 
				
			||||||
const HEAVY_VERIFY_RATE: f32 = 0.02;
 | 
					const HEAVY_VERIFY_RATE: f32 = 0.02;
 | 
				
			||||||
 | 
				
			|||||||
@ -25,7 +25,7 @@ use itertools::Itertools;
 | 
				
			|||||||
// util
 | 
					// util
 | 
				
			||||||
use hash::keccak;
 | 
					use hash::keccak;
 | 
				
			||||||
use timer::PerfTimer;
 | 
					use timer::PerfTimer;
 | 
				
			||||||
use util::{Bytes, Mutex, RwLock, MutexGuard};
 | 
					use util::Bytes;
 | 
				
			||||||
use util::{journaldb, DBValue, TrieFactory, Trie};
 | 
					use util::{journaldb, DBValue, TrieFactory, Trie};
 | 
				
			||||||
use util::{U256, H256, Address, H2048};
 | 
					use util::{U256, H256, Address, H2048};
 | 
				
			||||||
use util::trie::TrieSpec;
 | 
					use util::trie::TrieSpec;
 | 
				
			||||||
@ -56,6 +56,7 @@ use io::*;
 | 
				
			|||||||
use log_entry::LocalizedLogEntry;
 | 
					use log_entry::LocalizedLogEntry;
 | 
				
			||||||
use miner::{Miner, MinerService, TransactionImportResult};
 | 
					use miner::{Miner, MinerService, TransactionImportResult};
 | 
				
			||||||
use native_contracts::Registry;
 | 
					use native_contracts::Registry;
 | 
				
			||||||
 | 
					use parking_lot::{Mutex, RwLock, MutexGuard};
 | 
				
			||||||
use rand::OsRng;
 | 
					use rand::OsRng;
 | 
				
			||||||
use receipt::{Receipt, LocalizedReceipt};
 | 
					use receipt::{Receipt, LocalizedReceipt};
 | 
				
			||||||
use rlp::UntrustedRlp;
 | 
					use rlp::UntrustedRlp;
 | 
				
			||||||
 | 
				
			|||||||
@ -23,6 +23,7 @@ use std::mem;
 | 
				
			|||||||
use itertools::Itertools;
 | 
					use itertools::Itertools;
 | 
				
			||||||
use rustc_hex::FromHex;
 | 
					use rustc_hex::FromHex;
 | 
				
			||||||
use hash::keccak;
 | 
					use hash::keccak;
 | 
				
			||||||
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
use util::*;
 | 
					use util::*;
 | 
				
			||||||
use rlp::*;
 | 
					use rlp::*;
 | 
				
			||||||
use ethkey::{Generator, Random};
 | 
					use ethkey::{Generator, Random};
 | 
				
			||||||
 | 
				
			|||||||
@ -19,7 +19,8 @@
 | 
				
			|||||||
use std::ops::Deref;
 | 
					use std::ops::Deref;
 | 
				
			||||||
use std::hash::Hash;
 | 
					use std::hash::Hash;
 | 
				
			||||||
use std::collections::HashMap;
 | 
					use std::collections::HashMap;
 | 
				
			||||||
use util::{DBTransaction, KeyValueDB, RwLock};
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
 | 
					use util::{DBTransaction, KeyValueDB};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use rlp;
 | 
					use rlp;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -43,6 +43,7 @@ use io::{IoContext, IoHandler, TimerToken, IoService};
 | 
				
			|||||||
use itertools::{self, Itertools};
 | 
					use itertools::{self, Itertools};
 | 
				
			||||||
use rlp::{UntrustedRlp, encode};
 | 
					use rlp::{UntrustedRlp, encode};
 | 
				
			||||||
use semantic_version::SemanticVersion;
 | 
					use semantic_version::SemanticVersion;
 | 
				
			||||||
 | 
					use parking_lot::{Mutex, RwLock};
 | 
				
			||||||
use util::*;
 | 
					use util::*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
mod finality;
 | 
					mod finality;
 | 
				
			||||||
 | 
				
			|||||||
@ -19,6 +19,7 @@
 | 
				
			|||||||
use std::sync::{Weak, Arc};
 | 
					use std::sync::{Weak, Arc};
 | 
				
			||||||
use std::collections::BTreeMap;
 | 
					use std::collections::BTreeMap;
 | 
				
			||||||
use std::cmp;
 | 
					use std::cmp;
 | 
				
			||||||
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
use util::*;
 | 
					use util::*;
 | 
				
			||||||
use ethkey::{recover, public_to_address, Signature};
 | 
					use ethkey::{recover, public_to_address, Signature};
 | 
				
			||||||
use account_provider::AccountProvider;
 | 
					use account_provider::AccountProvider;
 | 
				
			||||||
 | 
				
			|||||||
@ -30,6 +30,7 @@ use std::sync::atomic::{AtomicUsize, Ordering as AtomicOrdering};
 | 
				
			|||||||
use std::collections::{HashSet, BTreeMap, HashMap};
 | 
					use std::collections::{HashSet, BTreeMap, HashMap};
 | 
				
			||||||
use hash::keccak;
 | 
					use hash::keccak;
 | 
				
			||||||
use std::cmp;
 | 
					use std::cmp;
 | 
				
			||||||
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
use util::*;
 | 
					use util::*;
 | 
				
			||||||
use client::{Client, EngineClient};
 | 
					use client::{Client, EngineClient};
 | 
				
			||||||
use error::{Error, BlockError};
 | 
					use error::{Error, BlockError};
 | 
				
			||||||
 | 
				
			|||||||
@ -18,6 +18,7 @@
 | 
				
			|||||||
/// It can also report validators for misbehaviour with two levels: `reportMalicious` and `reportBenign`.
 | 
					/// It can also report validators for misbehaviour with two levels: `reportMalicious` and `reportBenign`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use std::sync::Weak;
 | 
					use std::sync::Weak;
 | 
				
			||||||
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
use util::*;
 | 
					use util::*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use futures::Future;
 | 
					use futures::Future;
 | 
				
			||||||
 | 
				
			|||||||
@ -19,7 +19,8 @@
 | 
				
			|||||||
use std::collections::BTreeMap;
 | 
					use std::collections::BTreeMap;
 | 
				
			||||||
use std::sync::Weak;
 | 
					use std::sync::Weak;
 | 
				
			||||||
use engines::{Call, Engine};
 | 
					use engines::{Call, Engine};
 | 
				
			||||||
use util::{Bytes, H256, Address, RwLock};
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
 | 
					use util::{Bytes, H256, Address};
 | 
				
			||||||
use ids::BlockId;
 | 
					use ids::BlockId;
 | 
				
			||||||
use header::{BlockNumber, Header};
 | 
					use header::{BlockNumber, Header};
 | 
				
			||||||
use client::{Client, BlockChainClient};
 | 
					use client::{Client, BlockChainClient};
 | 
				
			||||||
 | 
				
			|||||||
@ -21,6 +21,7 @@ use futures::Future;
 | 
				
			|||||||
use native_contracts::ValidatorSet as Provider;
 | 
					use native_contracts::ValidatorSet as Provider;
 | 
				
			||||||
use hash::keccak;
 | 
					use hash::keccak;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
use util::*;
 | 
					use util::*;
 | 
				
			||||||
use util::cache::MemoryLruCache;
 | 
					use util::cache::MemoryLruCache;
 | 
				
			||||||
use rlp::{UntrustedRlp, RlpStream};
 | 
					use rlp::{UntrustedRlp, RlpStream};
 | 
				
			||||||
 | 
				
			|||||||
@ -19,6 +19,7 @@
 | 
				
			|||||||
use std::fmt::Debug;
 | 
					use std::fmt::Debug;
 | 
				
			||||||
use std::collections::{BTreeMap, HashSet, HashMap};
 | 
					use std::collections::{BTreeMap, HashSet, HashMap};
 | 
				
			||||||
use std::hash::Hash;
 | 
					use std::hash::Hash;
 | 
				
			||||||
 | 
					use parking_lot:: RwLock;
 | 
				
			||||||
use util::*;
 | 
					use util::*;
 | 
				
			||||||
use rlp::{Encodable, RlpStream};
 | 
					use rlp::{Encodable, RlpStream};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -98,6 +98,7 @@ extern crate lru_cache;
 | 
				
			|||||||
extern crate native_contracts;
 | 
					extern crate native_contracts;
 | 
				
			||||||
extern crate num_cpus;
 | 
					extern crate num_cpus;
 | 
				
			||||||
extern crate num;
 | 
					extern crate num;
 | 
				
			||||||
 | 
					extern crate parking_lot;
 | 
				
			||||||
extern crate price_info;
 | 
					extern crate price_info;
 | 
				
			||||||
extern crate rand;
 | 
					extern crate rand;
 | 
				
			||||||
extern crate rlp;
 | 
					extern crate rlp;
 | 
				
			||||||
 | 
				
			|||||||
@ -17,7 +17,8 @@
 | 
				
			|||||||
use std::collections::HashMap;
 | 
					use std::collections::HashMap;
 | 
				
			||||||
use std::sync::Arc;
 | 
					use std::sync::Arc;
 | 
				
			||||||
use std::time::{Instant, Duration};
 | 
					use std::time::{Instant, Duration};
 | 
				
			||||||
use util::{Mutex, U256, H256};
 | 
					use util::{U256, H256};
 | 
				
			||||||
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// External miner interface.
 | 
					/// External miner interface.
 | 
				
			||||||
pub trait ExternalMinerService: Send + Sync {
 | 
					pub trait ExternalMinerService: Send + Sync {
 | 
				
			||||||
 | 
				
			|||||||
@ -18,6 +18,7 @@ use std::time::{Instant, Duration};
 | 
				
			|||||||
use std::collections::{BTreeMap, HashSet};
 | 
					use std::collections::{BTreeMap, HashSet};
 | 
				
			||||||
use std::sync::Arc;
 | 
					use std::sync::Arc;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use parking_lot::{Mutex, RwLock};
 | 
				
			||||||
use util::*;
 | 
					use util::*;
 | 
				
			||||||
use timer::PerfTimer;
 | 
					use timer::PerfTimer;
 | 
				
			||||||
use using_queue::{UsingQueue, GetAction};
 | 
					use using_queue::{UsingQueue, GetAction};
 | 
				
			||||||
 | 
				
			|||||||
@ -20,7 +20,8 @@ use types::ids::BlockId;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use futures::{future, Future};
 | 
					use futures::{future, Future};
 | 
				
			||||||
use native_contracts::ServiceTransactionChecker as Contract;
 | 
					use native_contracts::ServiceTransactionChecker as Contract;
 | 
				
			||||||
use util::{U256, Mutex};
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					use util::U256;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const SERVICE_TRANSACTION_CONTRACT_REGISTRY_NAME: &'static str = "service_transaction_checker";
 | 
					const SERVICE_TRANSACTION_CONTRACT_REGISTRY_NAME: &'static str = "service_transaction_checker";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -28,7 +28,7 @@ use std::fmt;
 | 
				
			|||||||
use util::{H256, U256, H64, clean_0x};
 | 
					use util::{H256, U256, H64, clean_0x};
 | 
				
			||||||
use ethereum::ethash::Ethash;
 | 
					use ethereum::ethash::Ethash;
 | 
				
			||||||
use ethash::SeedHashCompute;
 | 
					use ethash::SeedHashCompute;
 | 
				
			||||||
use util::Mutex;
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
use miner::{self, Miner, MinerService};
 | 
					use miner::{self, Miner, MinerService};
 | 
				
			||||||
use client::Client;
 | 
					use client::Client;
 | 
				
			||||||
use block::IsBlock;
 | 
					use block::IsBlock;
 | 
				
			||||||
 | 
				
			|||||||
@ -24,6 +24,7 @@ use hyper::{Next};
 | 
				
			|||||||
use hyper::net::HttpStream;
 | 
					use hyper::net::HttpStream;
 | 
				
			||||||
use ethash::SeedHashCompute;
 | 
					use ethash::SeedHashCompute;
 | 
				
			||||||
use hyper::Url;
 | 
					use hyper::Url;
 | 
				
			||||||
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
use util::*;
 | 
					use util::*;
 | 
				
			||||||
use ethereum::ethash::Ethash;
 | 
					use ethereum::ethash::Ethash;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -31,7 +31,7 @@ use header::Header;
 | 
				
			|||||||
use ids::BlockId;
 | 
					use ids::BlockId;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use util::{Bytes, HashDB, DBValue, snappy, U256};
 | 
					use util::{Bytes, HashDB, DBValue, snappy, U256};
 | 
				
			||||||
use util::Mutex;
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
use util::hash::{H256};
 | 
					use util::hash::{H256};
 | 
				
			||||||
use util::journaldb::{self, Algorithm, JournalDB};
 | 
					use util::journaldb::{self, Algorithm, JournalDB};
 | 
				
			||||||
use util::kvdb::KeyValueDB;
 | 
					use util::kvdb::KeyValueDB;
 | 
				
			||||||
 | 
				
			|||||||
@ -35,7 +35,8 @@ use service::ClientIoMessage;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use io::IoChannel;
 | 
					use io::IoChannel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use util::{Bytes, H256, Mutex, RwLock, RwLockReadGuard, UtilError};
 | 
					use parking_lot::{Mutex, RwLock, RwLockReadGuard};
 | 
				
			||||||
 | 
					use util::{Bytes, H256, UtilError};
 | 
				
			||||||
use util::journaldb::Algorithm;
 | 
					use util::journaldb::Algorithm;
 | 
				
			||||||
use util::kvdb::{Database, DatabaseConfig};
 | 
					use util::kvdb::{Database, DatabaseConfig};
 | 
				
			||||||
use util::snappy;
 | 
					use util::snappy;
 | 
				
			||||||
 | 
				
			|||||||
@ -24,7 +24,8 @@ use blockchain::BlockChain;
 | 
				
			|||||||
use snapshot::{chunk_secondary, Error as SnapshotError, Progress, SnapshotComponents};
 | 
					use snapshot::{chunk_secondary, Error as SnapshotError, Progress, SnapshotComponents};
 | 
				
			||||||
use snapshot::io::{PackedReader, PackedWriter, SnapshotReader, SnapshotWriter};
 | 
					use snapshot::io::{PackedReader, PackedWriter, SnapshotReader, SnapshotWriter};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use util::{Mutex, snappy};
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					use util::snappy;
 | 
				
			||||||
use util::kvdb::{self, KeyValueDB, DBTransaction};
 | 
					use util::kvdb::{self, KeyValueDB, DBTransaction};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use std::sync::Arc;
 | 
					use std::sync::Arc;
 | 
				
			||||||
 | 
				
			|||||||
@ -29,7 +29,7 @@ use util::hash::H256;
 | 
				
			|||||||
use util::journaldb::{self, Algorithm};
 | 
					use util::journaldb::{self, Algorithm};
 | 
				
			||||||
use util::kvdb::{Database, DatabaseConfig};
 | 
					use util::kvdb::{Database, DatabaseConfig};
 | 
				
			||||||
use util::memorydb::MemoryDB;
 | 
					use util::memorydb::MemoryDB;
 | 
				
			||||||
use util::Mutex;
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
use devtools::RandomTempPath;
 | 
					use devtools::RandomTempPath;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use std::sync::Arc;
 | 
					use std::sync::Arc;
 | 
				
			||||||
 | 
				
			|||||||
@ -16,7 +16,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
//! Watcher for snapshot-related chain events.
 | 
					//! Watcher for snapshot-related chain events.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use util::Mutex;
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
use client::{BlockChainClient, Client, ChainNotify};
 | 
					use client::{BlockChainClient, Client, ChainNotify};
 | 
				
			||||||
use ids::BlockId;
 | 
					use ids::BlockId;
 | 
				
			||||||
use service::ClientIoMessage;
 | 
					use service::ClientIoMessage;
 | 
				
			||||||
 | 
				
			|||||||
@ -40,6 +40,7 @@ use state_db::StateDB;
 | 
				
			|||||||
use state::{Backend, State, Substate};
 | 
					use state::{Backend, State, Substate};
 | 
				
			||||||
use state::backend::Basic as BasicBackend;
 | 
					use state::backend::Basic as BasicBackend;
 | 
				
			||||||
use trace::{NoopTracer, NoopVMTracer};
 | 
					use trace::{NoopTracer, NoopVMTracer};
 | 
				
			||||||
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
use util::*;
 | 
					use util::*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Parameters common to ethereum-like blockchains.
 | 
					/// Parameters common to ethereum-like blockchains.
 | 
				
			||||||
 | 
				
			|||||||
@ -25,7 +25,8 @@ use std::collections::{HashSet, HashMap};
 | 
				
			|||||||
use std::sync::Arc;
 | 
					use std::sync::Arc;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use state::Account;
 | 
					use state::Account;
 | 
				
			||||||
use util::{Address, MemoryDB, Mutex, H256};
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					use util::{Address, MemoryDB, H256};
 | 
				
			||||||
use util::hashdb::{AsHashDB, HashDB, DBValue};
 | 
					use util::hashdb::{AsHashDB, HashDB, DBValue};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// State backend. See module docs for more details.
 | 
					/// State backend. See module docs for more details.
 | 
				
			||||||
 | 
				
			|||||||
@ -25,7 +25,8 @@ use util::hashdb::HashDB;
 | 
				
			|||||||
use state::{self, Account};
 | 
					use state::{self, Account};
 | 
				
			||||||
use header::BlockNumber;
 | 
					use header::BlockNumber;
 | 
				
			||||||
use hash::keccak;
 | 
					use hash::keccak;
 | 
				
			||||||
use util::{Address, DBTransaction, UtilError, Mutex};
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					use util::{Address, DBTransaction, UtilError};
 | 
				
			||||||
use bloom_journal::{Bloom, BloomJournal};
 | 
					use bloom_journal::{Bloom, BloomJournal};
 | 
				
			||||||
use db::COL_ACCOUNT_BLOOM;
 | 
					use db::COL_ACCOUNT_BLOOM;
 | 
				
			||||||
use byteorder::{LittleEndian, ByteOrder};
 | 
					use byteorder::{LittleEndian, ByteOrder};
 | 
				
			||||||
 | 
				
			|||||||
@ -21,7 +21,8 @@ use std::sync::Arc;
 | 
				
			|||||||
use bloomchain::{Number, Config as BloomConfig};
 | 
					use bloomchain::{Number, Config as BloomConfig};
 | 
				
			||||||
use bloomchain::group::{BloomGroupDatabase, BloomGroupChain, GroupPosition, BloomGroup};
 | 
					use bloomchain::group::{BloomGroupDatabase, BloomGroupChain, GroupPosition, BloomGroup};
 | 
				
			||||||
use heapsize::HeapSizeOf;
 | 
					use heapsize::HeapSizeOf;
 | 
				
			||||||
use util::{H256, H264, KeyValueDB, DBTransaction, RwLock};
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
 | 
					use util::{H256, H264, KeyValueDB, DBTransaction};
 | 
				
			||||||
use header::BlockNumber;
 | 
					use header::BlockNumber;
 | 
				
			||||||
use trace::{LocalizedTrace, Config, Filter, Database as TraceDatabase, ImportRequest, DatabaseExtras};
 | 
					use trace::{LocalizedTrace, Config, Filter, Database as TraceDatabase, ImportRequest, DatabaseExtras};
 | 
				
			||||||
use db::{self, Key, Writable, Readable, CacheUpdatePolicy};
 | 
					use db::{self, Key, Writable, Readable, CacheUpdatePolicy};
 | 
				
			||||||
 | 
				
			|||||||
@ -23,6 +23,7 @@ use std::sync::{Condvar as SCondvar, Mutex as SMutex, Arc};
 | 
				
			|||||||
use std::cmp;
 | 
					use std::cmp;
 | 
				
			||||||
use std::collections::{VecDeque, HashSet, HashMap};
 | 
					use std::collections::{VecDeque, HashSet, HashMap};
 | 
				
			||||||
use heapsize::HeapSizeOf;
 | 
					use heapsize::HeapSizeOf;
 | 
				
			||||||
 | 
					use parking_lot::{Condvar, Mutex, RwLock};
 | 
				
			||||||
use util::*;
 | 
					use util::*;
 | 
				
			||||||
use io::*;
 | 
					use io::*;
 | 
				
			||||||
use error::*;
 | 
					use error::*;
 | 
				
			||||||
 | 
				
			|||||||
@ -14,6 +14,7 @@ mime = "0.2"
 | 
				
			|||||||
mime_guess = "1.6.1"
 | 
					mime_guess = "1.6.1"
 | 
				
			||||||
rand = "0.3"
 | 
					rand = "0.3"
 | 
				
			||||||
rustc-hex = "1.0"
 | 
					rustc-hex = "1.0"
 | 
				
			||||||
 | 
					parking_lot = "0.4"
 | 
				
			||||||
fetch = { path = "../util/fetch" }
 | 
					fetch = { path = "../util/fetch" }
 | 
				
			||||||
ethcore-util = { path = "../util" }
 | 
					ethcore-util = { path = "../util" }
 | 
				
			||||||
parity-reactor = { path = "../util/reactor" }
 | 
					parity-reactor = { path = "../util/reactor" }
 | 
				
			||||||
 | 
				
			|||||||
@ -191,7 +191,7 @@ fn random_temp_path() -> PathBuf {
 | 
				
			|||||||
mod tests {
 | 
					mod tests {
 | 
				
			||||||
	use rustc_hex::FromHex;
 | 
						use rustc_hex::FromHex;
 | 
				
			||||||
	use std::sync::{Arc, mpsc};
 | 
						use std::sync::{Arc, mpsc};
 | 
				
			||||||
	use util::Mutex;
 | 
						use parking_lot::Mutex;
 | 
				
			||||||
	use futures::future;
 | 
						use futures::future;
 | 
				
			||||||
	use fetch::{self, Fetch};
 | 
						use fetch::{self, Fetch};
 | 
				
			||||||
	use parity_reactor::Remote;
 | 
						use parity_reactor::Remote;
 | 
				
			||||||
 | 
				
			|||||||
@ -29,6 +29,7 @@ extern crate futures;
 | 
				
			|||||||
extern crate mime_guess;
 | 
					extern crate mime_guess;
 | 
				
			||||||
extern crate native_contracts;
 | 
					extern crate native_contracts;
 | 
				
			||||||
extern crate parity_reactor;
 | 
					extern crate parity_reactor;
 | 
				
			||||||
 | 
					extern crate parking_lot;
 | 
				
			||||||
extern crate rand;
 | 
					extern crate rand;
 | 
				
			||||||
extern crate rustc_hex;
 | 
					extern crate rustc_hex;
 | 
				
			||||||
extern crate hash;
 | 
					extern crate hash;
 | 
				
			||||||
 | 
				
			|||||||
@ -216,7 +216,8 @@ pub mod tests {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	use super::*;
 | 
						use super::*;
 | 
				
			||||||
	use super::guess_mime_type;
 | 
						use super::guess_mime_type;
 | 
				
			||||||
	use util::{Bytes, Address, Mutex, ToPretty};
 | 
						use parking_lot::Mutex;
 | 
				
			||||||
 | 
						use util::{Bytes, Address, ToPretty};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pub struct FakeRegistrar {
 | 
						pub struct FakeRegistrar {
 | 
				
			||||||
		pub calls: Arc<Mutex<Vec<(String, String)>>>,
 | 
							pub calls: Arc<Mutex<Vec<(String, String)>>>,
 | 
				
			||||||
 | 
				
			|||||||
@ -155,6 +155,7 @@ pub fn execute(cmd: BlockchainCmd) -> Result<(), String> {
 | 
				
			|||||||
fn execute_import_light(cmd: ImportBlockchain) -> Result<(), String> {
 | 
					fn execute_import_light(cmd: ImportBlockchain) -> Result<(), String> {
 | 
				
			||||||
	use light::client::{Service as LightClientService, Config as LightClientConfig};
 | 
						use light::client::{Service as LightClientService, Config as LightClientConfig};
 | 
				
			||||||
	use light::cache::Cache as LightDataCache;
 | 
						use light::cache::Cache as LightDataCache;
 | 
				
			||||||
 | 
						use parking_lot::Mutex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	let timer = Instant::now();
 | 
						let timer = Instant::now();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -188,7 +189,7 @@ fn execute_import_light(cmd: ImportBlockchain) -> Result<(), String> {
 | 
				
			|||||||
	// create dirs used by parity
 | 
						// create dirs used by parity
 | 
				
			||||||
	cmd.dirs.create_dirs(false, false, false)?;
 | 
						cmd.dirs.create_dirs(false, false, false)?;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	let cache = Arc::new(::util::Mutex::new(
 | 
						let cache = Arc::new(Mutex::new(
 | 
				
			||||||
		LightDataCache::new(Default::default(), ::time::Duration::seconds(0))
 | 
							LightDataCache::new(Default::default(), ::time::Duration::seconds(0))
 | 
				
			||||||
	));
 | 
						));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -35,7 +35,8 @@ use light::client::LightChainClient;
 | 
				
			|||||||
use number_prefix::{binary_prefix, Standalone, Prefixed};
 | 
					use number_prefix::{binary_prefix, Standalone, Prefixed};
 | 
				
			||||||
use parity_rpc::{is_major_importing};
 | 
					use parity_rpc::{is_major_importing};
 | 
				
			||||||
use parity_rpc::informant::RpcStats;
 | 
					use parity_rpc::informant::RpcStats;
 | 
				
			||||||
use util::{RwLock, Mutex, H256, Bytes};
 | 
					use parking_lot::{RwLock, Mutex};
 | 
				
			||||||
 | 
					use util::{H256, Bytes};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Format byte counts to standard denominations.
 | 
					/// Format byte counts to standard denominations.
 | 
				
			||||||
pub fn format_bytes(b: usize) -> String {
 | 
					pub fn format_bytes(b: usize) -> String {
 | 
				
			||||||
 | 
				
			|||||||
@ -31,7 +31,7 @@ use futures::{future, Future};
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use parity_reactor::Remote;
 | 
					use parity_reactor::Remote;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use util::RwLock;
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Attepmt to cull once every 10 minutes.
 | 
					// Attepmt to cull once every 10 minutes.
 | 
				
			||||||
const TOKEN: TimerToken = 1;
 | 
					const TOKEN: TimerToken = 1;
 | 
				
			||||||
 | 
				
			|||||||
@ -34,6 +34,7 @@ extern crate isatty;
 | 
				
			|||||||
extern crate jsonrpc_core;
 | 
					extern crate jsonrpc_core;
 | 
				
			||||||
extern crate num_cpus;
 | 
					extern crate num_cpus;
 | 
				
			||||||
extern crate number_prefix;
 | 
					extern crate number_prefix;
 | 
				
			||||||
 | 
					extern crate parking_lot;
 | 
				
			||||||
extern crate regex;
 | 
					extern crate regex;
 | 
				
			||||||
extern crate rlp;
 | 
					extern crate rlp;
 | 
				
			||||||
extern crate rpassword;
 | 
					extern crate rpassword;
 | 
				
			||||||
 | 
				
			|||||||
@ -38,7 +38,7 @@ use parity_rpc::dispatch::{FullDispatcher, LightDispatcher};
 | 
				
			|||||||
use parity_rpc::informant::{ActivityNotifier, ClientNotifier};
 | 
					use parity_rpc::informant::{ActivityNotifier, ClientNotifier};
 | 
				
			||||||
use parity_rpc::{Metadata, NetworkSettings};
 | 
					use parity_rpc::{Metadata, NetworkSettings};
 | 
				
			||||||
use updater::Updater;
 | 
					use updater::Updater;
 | 
				
			||||||
use util::{Mutex, RwLock};
 | 
					use parking_lot::{Mutex, RwLock};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#[derive(Debug, PartialEq, Clone, Eq, Hash)]
 | 
					#[derive(Debug, PartialEq, Clone, Eq, Hash)]
 | 
				
			||||||
pub enum Api {
 | 
					pub enum Api {
 | 
				
			||||||
 | 
				
			|||||||
@ -37,8 +37,9 @@ use node_health;
 | 
				
			|||||||
use parity_reactor::EventLoop;
 | 
					use parity_reactor::EventLoop;
 | 
				
			||||||
use parity_rpc::{NetworkSettings, informant, is_major_importing};
 | 
					use parity_rpc::{NetworkSettings, informant, is_major_importing};
 | 
				
			||||||
use updater::{UpdatePolicy, Updater};
 | 
					use updater::{UpdatePolicy, Updater};
 | 
				
			||||||
use util::{version, Mutex, Condvar};
 | 
					 | 
				
			||||||
use ansi_term::Colour;
 | 
					use ansi_term::Colour;
 | 
				
			||||||
 | 
					use util::version;
 | 
				
			||||||
 | 
					use parking_lot::{Condvar, Mutex};
 | 
				
			||||||
use node_filter::NodeFilter;
 | 
					use node_filter::NodeFilter;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use params::{
 | 
					use params::{
 | 
				
			||||||
@ -171,7 +172,7 @@ impl ::local_store::NodeInfo for FullNodeInfo {
 | 
				
			|||||||
fn execute_light(cmd: RunCmd, can_restart: bool, logger: Arc<RotatingLogger>) -> Result<(bool, Option<String>), String> {
 | 
					fn execute_light(cmd: RunCmd, can_restart: bool, logger: Arc<RotatingLogger>) -> Result<(bool, Option<String>), String> {
 | 
				
			||||||
	use light::client as light_client;
 | 
						use light::client as light_client;
 | 
				
			||||||
	use ethsync::{LightSyncParams, LightSync, ManageNetwork};
 | 
						use ethsync::{LightSyncParams, LightSync, ManageNetwork};
 | 
				
			||||||
	use util::RwLock;
 | 
						use parking_lot::{Mutex, RwLock};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// load spec
 | 
						// load spec
 | 
				
			||||||
	let spec = cmd.spec.spec(&cmd.dirs.cache)?;
 | 
						let spec = cmd.spec.spec(&cmd.dirs.cache)?;
 | 
				
			||||||
@ -206,7 +207,7 @@ fn execute_light(cmd: RunCmd, can_restart: bool, logger: Arc<RotatingLogger>) ->
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	// TODO: configurable cache size.
 | 
						// TODO: configurable cache size.
 | 
				
			||||||
	let cache = LightDataCache::new(Default::default(), ::time::Duration::minutes(GAS_CORPUS_EXPIRATION_MINUTES));
 | 
						let cache = LightDataCache::new(Default::default(), ::time::Duration::minutes(GAS_CORPUS_EXPIRATION_MINUTES));
 | 
				
			||||||
	let cache = Arc::new(::util::Mutex::new(cache));
 | 
						let cache = Arc::new(Mutex::new(cache));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// start client and create transaction queue.
 | 
						// start client and create transaction queue.
 | 
				
			||||||
	let mut config = light_client::Config {
 | 
						let mut config = light_client::Config {
 | 
				
			||||||
 | 
				
			|||||||
@ -15,6 +15,7 @@ futures-cpupool = "0.1"
 | 
				
			|||||||
log = "0.3"
 | 
					log = "0.3"
 | 
				
			||||||
multihash ="0.6"
 | 
					multihash ="0.6"
 | 
				
			||||||
order-stat = "0.1"
 | 
					order-stat = "0.1"
 | 
				
			||||||
 | 
					parking_lot = "0.4"
 | 
				
			||||||
rand = "0.3"
 | 
					rand = "0.3"
 | 
				
			||||||
rust-crypto = "0.2"
 | 
					rust-crypto = "0.2"
 | 
				
			||||||
rustc-hex = "1.0"
 | 
					rustc-hex = "1.0"
 | 
				
			||||||
 | 
				
			|||||||
@ -28,6 +28,7 @@ extern crate futures_cpupool;
 | 
				
			|||||||
extern crate itertools;
 | 
					extern crate itertools;
 | 
				
			||||||
extern crate multihash;
 | 
					extern crate multihash;
 | 
				
			||||||
extern crate order_stat;
 | 
					extern crate order_stat;
 | 
				
			||||||
 | 
					extern crate parking_lot;
 | 
				
			||||||
extern crate rand;
 | 
					extern crate rand;
 | 
				
			||||||
extern crate rustc_hex;
 | 
					extern crate rustc_hex;
 | 
				
			||||||
extern crate semver;
 | 
					extern crate semver;
 | 
				
			||||||
 | 
				
			|||||||
@ -27,7 +27,8 @@ use light::on_demand::{request, OnDemand};
 | 
				
			|||||||
use light::TransactionQueue as LightTransactionQueue;
 | 
					use light::TransactionQueue as LightTransactionQueue;
 | 
				
			||||||
use rlp;
 | 
					use rlp;
 | 
				
			||||||
use hash::keccak;
 | 
					use hash::keccak;
 | 
				
			||||||
use util::{Address, H520, H256, U256, Bytes, Mutex, RwLock};
 | 
					use util::{Address, H520, H256, U256, Bytes};
 | 
				
			||||||
 | 
					use parking_lot::{Mutex, RwLock};
 | 
				
			||||||
use stats::Corpus;
 | 
					use stats::Corpus;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use ethkey::Signature;
 | 
					use ethkey::Signature;
 | 
				
			||||||
 | 
				
			|||||||
@ -37,7 +37,8 @@ use light::on_demand::{request, OnDemand, HeaderRef, Request as OnDemandRequest,
 | 
				
			|||||||
use light::request::Field;
 | 
					use light::request::Field;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use ethsync::LightSync;
 | 
					use ethsync::LightSync;
 | 
				
			||||||
use util::{Address, Mutex, U256};
 | 
					use util::{Address, U256};
 | 
				
			||||||
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use v1::helpers::{CallRequest as CallRequestHelper, errors, dispatch};
 | 
					use v1::helpers::{CallRequest as CallRequestHelper, errors, dispatch};
 | 
				
			||||||
use v1::types::{BlockNumber, CallRequest, Log};
 | 
					use v1::types::{BlockNumber, CallRequest, Log};
 | 
				
			||||||
 | 
				
			|||||||
@ -17,7 +17,7 @@
 | 
				
			|||||||
use std::sync::Arc;
 | 
					use std::sync::Arc;
 | 
				
			||||||
use std::ops::Deref;
 | 
					use std::ops::Deref;
 | 
				
			||||||
use http::Origin;
 | 
					use http::Origin;
 | 
				
			||||||
use util::Mutex;
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
use transient_hashmap::TransientHashMap;
 | 
					use transient_hashmap::TransientHashMap;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use ethstore::random_string;
 | 
					use ethstore::random_string;
 | 
				
			||||||
 | 
				
			|||||||
@ -19,7 +19,8 @@ use std::cell::RefCell;
 | 
				
			|||||||
use std::sync::Arc;
 | 
					use std::sync::Arc;
 | 
				
			||||||
use std::collections::BTreeMap;
 | 
					use std::collections::BTreeMap;
 | 
				
			||||||
use jsonrpc_core;
 | 
					use jsonrpc_core;
 | 
				
			||||||
use util::{Mutex, RwLock, U256, Address};
 | 
					use parking_lot::{Mutex, RwLock};
 | 
				
			||||||
 | 
					use util::{U256, Address};
 | 
				
			||||||
use ethcore::account_provider::DappId;
 | 
					use ethcore::account_provider::DappId;
 | 
				
			||||||
use v1::helpers::{ConfirmationRequest, ConfirmationPayload};
 | 
					use v1::helpers::{ConfirmationRequest, ConfirmationPayload};
 | 
				
			||||||
use v1::types::{ConfirmationResponse, H160 as RpcH160, Origin, DappId as RpcDappId};
 | 
					use v1::types::{ConfirmationResponse, H160 as RpcH160, Origin, DappId as RpcDappId};
 | 
				
			||||||
@ -297,7 +298,8 @@ mod test {
 | 
				
			|||||||
	use std::time::Duration;
 | 
						use std::time::Duration;
 | 
				
			||||||
	use std::thread;
 | 
						use std::thread;
 | 
				
			||||||
	use std::sync::{mpsc, Arc};
 | 
						use std::sync::{mpsc, Arc};
 | 
				
			||||||
	use util::{Address, U256, Mutex};
 | 
						use parking_lot::Mutex;
 | 
				
			||||||
 | 
						use util::{Address, U256};
 | 
				
			||||||
	use v1::helpers::{SigningQueue, ConfirmationsQueue, QueueEvent, FilledTransactionRequest, ConfirmationPayload};
 | 
						use v1::helpers::{SigningQueue, ConfirmationsQueue, QueueEvent, FilledTransactionRequest, ConfirmationPayload};
 | 
				
			||||||
	use v1::types::ConfirmationResponse;
 | 
						use v1::types::ConfirmationResponse;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -18,7 +18,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use std::sync::Arc;
 | 
					use std::sync::Arc;
 | 
				
			||||||
use std::sync::atomic::{self, AtomicBool};
 | 
					use std::sync::atomic::{self, AtomicBool};
 | 
				
			||||||
use util::Mutex;
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use jsonrpc_core::futures::future::{self, Either};
 | 
					use jsonrpc_core::futures::future::{self, Either};
 | 
				
			||||||
use jsonrpc_core::futures::sync::mpsc;
 | 
					use jsonrpc_core::futures::sync::mpsc;
 | 
				
			||||||
 | 
				
			|||||||
@ -24,7 +24,7 @@ use futures::{self, future, BoxFuture, Future};
 | 
				
			|||||||
use rlp::{self, UntrustedRlp};
 | 
					use rlp::{self, UntrustedRlp};
 | 
				
			||||||
use time::get_time;
 | 
					use time::get_time;
 | 
				
			||||||
use util::{H160, H256, Address, U256, H64};
 | 
					use util::{H160, H256, Address, U256, H64};
 | 
				
			||||||
use util::Mutex;
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use ethash::SeedHashCompute;
 | 
					use ethash::SeedHashCompute;
 | 
				
			||||||
use ethcore::account_provider::{AccountProvider, DappId};
 | 
					use ethcore::account_provider::{AccountProvider, DappId};
 | 
				
			||||||
 | 
				
			|||||||
@ -23,7 +23,8 @@ use jsonrpc_core::*;
 | 
				
			|||||||
use ethcore::miner::MinerService;
 | 
					use ethcore::miner::MinerService;
 | 
				
			||||||
use ethcore::filter::Filter as EthcoreFilter;
 | 
					use ethcore::filter::Filter as EthcoreFilter;
 | 
				
			||||||
use ethcore::client::{BlockChainClient, BlockId};
 | 
					use ethcore::client::{BlockChainClient, BlockId};
 | 
				
			||||||
use util::{H256, Mutex};
 | 
					use util::H256;
 | 
				
			||||||
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use futures::{future, Future, BoxFuture};
 | 
					use futures::{future, Future, BoxFuture};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -39,7 +39,8 @@ use light::cache::Cache;
 | 
				
			|||||||
use light::on_demand::OnDemand;
 | 
					use light::on_demand::OnDemand;
 | 
				
			||||||
use light::client::{LightChainClient, LightChainNotify};
 | 
					use light::client::{LightChainClient, LightChainNotify};
 | 
				
			||||||
use parity_reactor::Remote;
 | 
					use parity_reactor::Remote;
 | 
				
			||||||
use util::{RwLock, Mutex, H256, Bytes};
 | 
					use util::{H256, Bytes};
 | 
				
			||||||
 | 
					use parking_lot::{RwLock, Mutex};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Client = Sink<pubsub::Result>;
 | 
					type Client = Sink<pubsub::Result>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -39,7 +39,8 @@ use ethcore::transaction::{Action, SignedTransaction, Transaction as EthTransact
 | 
				
			|||||||
use ethsync::LightSync;
 | 
					use ethsync::LightSync;
 | 
				
			||||||
use rlp::UntrustedRlp;
 | 
					use rlp::UntrustedRlp;
 | 
				
			||||||
use hash::{KECCAK_NULL_RLP, KECCAK_EMPTY_LIST_RLP};
 | 
					use hash::{KECCAK_NULL_RLP, KECCAK_EMPTY_LIST_RLP};
 | 
				
			||||||
use util::{RwLock, Mutex, U256};
 | 
					use util::U256;
 | 
				
			||||||
 | 
					use parking_lot::{RwLock, Mutex};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use futures::{future, Future, BoxFuture, IntoFuture};
 | 
					use futures::{future, Future, BoxFuture, IntoFuture};
 | 
				
			||||||
use futures::sync::oneshot;
 | 
					use futures::sync::oneshot;
 | 
				
			||||||
 | 
				
			|||||||
@ -18,7 +18,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use std::sync::Arc;
 | 
					use std::sync::Arc;
 | 
				
			||||||
use std::time::Duration;
 | 
					use std::time::Duration;
 | 
				
			||||||
use util::RwLock;
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use futures::{self, BoxFuture, Future, Stream, Sink};
 | 
					use futures::{self, BoxFuture, Future, Stream, Sink};
 | 
				
			||||||
use jsonrpc_core::{self as core, Error, MetaIoHandler};
 | 
					use jsonrpc_core::{self as core, Error, MetaIoHandler};
 | 
				
			||||||
 | 
				
			|||||||
@ -24,7 +24,7 @@ use ethkey;
 | 
				
			|||||||
use futures::{future, BoxFuture, Future, IntoFuture};
 | 
					use futures::{future, BoxFuture, Future, IntoFuture};
 | 
				
			||||||
use parity_reactor::Remote;
 | 
					use parity_reactor::Remote;
 | 
				
			||||||
use rlp::UntrustedRlp;
 | 
					use rlp::UntrustedRlp;
 | 
				
			||||||
use util::Mutex;
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use jsonrpc_core::{futures, Error};
 | 
					use jsonrpc_core::{futures, Error};
 | 
				
			||||||
use jsonrpc_pubsub::SubscriptionId;
 | 
					use jsonrpc_pubsub::SubscriptionId;
 | 
				
			||||||
 | 
				
			|||||||
@ -18,7 +18,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use std::sync::Arc;
 | 
					use std::sync::Arc;
 | 
				
			||||||
use transient_hashmap::TransientHashMap;
 | 
					use transient_hashmap::TransientHashMap;
 | 
				
			||||||
use util::{U256, Mutex};
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					use util::U256;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use ethcore::account_provider::AccountProvider;
 | 
					use ethcore::account_provider::AccountProvider;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -24,7 +24,7 @@ use futures::Future;
 | 
				
			|||||||
use futures_cpupool as pool;
 | 
					use futures_cpupool as pool;
 | 
				
			||||||
use jsonrpc_core as rpc;
 | 
					use jsonrpc_core as rpc;
 | 
				
			||||||
use order_stat;
 | 
					use order_stat;
 | 
				
			||||||
use util::RwLock;
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pub use self::pool::CpuPool;
 | 
					pub use self::pool::CpuPool;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -18,7 +18,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use std::collections::{BTreeMap, HashMap};
 | 
					use std::collections::{BTreeMap, HashMap};
 | 
				
			||||||
use std::collections::hash_map::Entry;
 | 
					use std::collections::hash_map::Entry;
 | 
				
			||||||
use util::{Address, H256, Bytes, U256, RwLock, Mutex};
 | 
					use util::{Address, H256, Bytes, U256};
 | 
				
			||||||
 | 
					use parking_lot::{RwLock, Mutex};
 | 
				
			||||||
use ethcore::error::Error;
 | 
					use ethcore::error::Error;
 | 
				
			||||||
use ethcore::client::MiningBlockChainClient;
 | 
					use ethcore::client::MiningBlockChainClient;
 | 
				
			||||||
use ethcore::block::ClosedBlock;
 | 
					use ethcore::block::ClosedBlock;
 | 
				
			||||||
 | 
				
			|||||||
@ -16,7 +16,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use ethcore::snapshot::{ManifestData, RestorationStatus, SnapshotService};
 | 
					use ethcore::snapshot::{ManifestData, RestorationStatus, SnapshotService};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use util::{Bytes, Mutex};
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					use util::Bytes;
 | 
				
			||||||
use util::hash::H256;
 | 
					use util::hash::H256;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Mocked snapshot service (used for sync info extensions).
 | 
					/// Mocked snapshot service (used for sync info extensions).
 | 
				
			||||||
 | 
				
			|||||||
@ -17,7 +17,8 @@
 | 
				
			|||||||
//! Test implementation of SyncProvider.
 | 
					//! Test implementation of SyncProvider.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use std::collections::BTreeMap;
 | 
					use std::collections::BTreeMap;
 | 
				
			||||||
use util::{H256, RwLock};
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
 | 
					use util::H256;
 | 
				
			||||||
use ethsync::{SyncProvider, EthProtocolInfo, SyncStatus, SyncState, PeerInfo, TransactionStats};
 | 
					use ethsync::{SyncProvider, EthProtocolInfo, SyncStatus, SyncState, PeerInfo, TransactionStats};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// TestSyncProvider config.
 | 
					/// TestSyncProvider config.
 | 
				
			||||||
 | 
				
			|||||||
@ -22,7 +22,8 @@ use rustc_hex::{FromHex, ToHex};
 | 
				
			|||||||
use time::get_time;
 | 
					use time::get_time;
 | 
				
			||||||
use rlp;
 | 
					use rlp;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use util::{U256, Address, H256, Mutex};
 | 
					use util::{U256, Address, H256};
 | 
				
			||||||
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
use ethkey::Secret;
 | 
					use ethkey::Secret;
 | 
				
			||||||
use ethcore::account_provider::AccountProvider;
 | 
					use ethcore::account_provider::AccountProvider;
 | 
				
			||||||
use ethcore::client::{TestBlockChainClient, EachBlockWith, Executed, TransactionId};
 | 
					use ethcore::client::{TestBlockChainClient, EachBlockWith, Executed, TransactionId};
 | 
				
			||||||
 | 
				
			|||||||
@ -15,6 +15,7 @@ serde_json = "1.0"
 | 
				
			|||||||
tempdir = "0.3.5"
 | 
					tempdir = "0.3.5"
 | 
				
			||||||
url = "1.2.0"
 | 
					url = "1.2.0"
 | 
				
			||||||
matches = "0.1"
 | 
					matches = "0.1"
 | 
				
			||||||
 | 
					parking_lot = "0.4"
 | 
				
			||||||
jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.7" }
 | 
					jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.7" }
 | 
				
			||||||
jsonrpc-ws-server = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.7" }
 | 
					jsonrpc-ws-server = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.7" }
 | 
				
			||||||
parity-rpc = { path = "../rpc" }
 | 
					parity-rpc = { path = "../rpc" }
 | 
				
			||||||
 | 
				
			|||||||
@ -10,7 +10,7 @@ use std::time;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use std::path::PathBuf;
 | 
					use std::path::PathBuf;
 | 
				
			||||||
use hash::keccak;
 | 
					use hash::keccak;
 | 
				
			||||||
use util::Mutex;
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
use url::Url;
 | 
					use url::Url;
 | 
				
			||||||
use std::fs::File;
 | 
					use std::fs::File;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -6,6 +6,7 @@ extern crate futures;
 | 
				
			|||||||
extern crate jsonrpc_core;
 | 
					extern crate jsonrpc_core;
 | 
				
			||||||
extern crate jsonrpc_ws_server as ws;
 | 
					extern crate jsonrpc_ws_server as ws;
 | 
				
			||||||
extern crate parity_rpc as rpc;
 | 
					extern crate parity_rpc as rpc;
 | 
				
			||||||
 | 
					extern crate parking_lot;
 | 
				
			||||||
extern crate rand;
 | 
					extern crate rand;
 | 
				
			||||||
extern crate serde;
 | 
					extern crate serde;
 | 
				
			||||||
extern crate serde_json;
 | 
					extern crate serde_json;
 | 
				
			||||||
 | 
				
			|||||||
@ -23,5 +23,6 @@ semver = "0.6"
 | 
				
			|||||||
ethcore-ipc-nano = { path = "../ipc/nano" }
 | 
					ethcore-ipc-nano = { path = "../ipc/nano" }
 | 
				
			||||||
futures = "0.1"
 | 
					futures = "0.1"
 | 
				
			||||||
tokio-core = "0.1"
 | 
					tokio-core = "0.1"
 | 
				
			||||||
 | 
					parking_lot = "0.4"
 | 
				
			||||||
ethcore-logger = { path = "../logger" }
 | 
					ethcore-logger = { path = "../logger" }
 | 
				
			||||||
hash = { path = "../util/hash" }
 | 
					hash = { path = "../util/hash" }
 | 
				
			||||||
 | 
				
			|||||||
@ -26,6 +26,7 @@ extern crate semver;
 | 
				
			|||||||
extern crate futures;
 | 
					extern crate futures;
 | 
				
			||||||
extern crate ethcore_logger;
 | 
					extern crate ethcore_logger;
 | 
				
			||||||
extern crate hash;
 | 
					extern crate hash;
 | 
				
			||||||
 | 
					extern crate parking_lot;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#[cfg(test)] extern crate tokio_core;
 | 
					#[cfg(test)] extern crate tokio_core;
 | 
				
			||||||
extern crate ethcore_devtools as devtools;
 | 
					extern crate ethcore_devtools as devtools;
 | 
				
			||||||
@ -56,7 +57,8 @@ use std::sync::Arc;
 | 
				
			|||||||
use std::net::SocketAddr;
 | 
					use std::net::SocketAddr;
 | 
				
			||||||
use std::collections::{HashSet, HashMap};
 | 
					use std::collections::{HashSet, HashMap};
 | 
				
			||||||
use hash::keccak;
 | 
					use hash::keccak;
 | 
				
			||||||
use util::{H256, RwLock, RwLockReadGuard};
 | 
					use parking_lot::{RwLock, RwLockReadGuard};
 | 
				
			||||||
 | 
					use util::H256;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type RpcResult = BoxFuture<jsonrpc_core::Value, jsonrpc_core::Error>;
 | 
					type RpcResult = BoxFuture<jsonrpc_core::Value, jsonrpc_core::Error>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -93,6 +93,7 @@ use std::collections::{HashSet, HashMap};
 | 
				
			|||||||
use std::cmp;
 | 
					use std::cmp;
 | 
				
			||||||
use hash::keccak;
 | 
					use hash::keccak;
 | 
				
			||||||
use heapsize::HeapSizeOf;
 | 
					use heapsize::HeapSizeOf;
 | 
				
			||||||
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
use util::*;
 | 
					use util::*;
 | 
				
			||||||
use rlp::*;
 | 
					use rlp::*;
 | 
				
			||||||
use network::*;
 | 
					use network::*;
 | 
				
			||||||
@ -2230,7 +2231,8 @@ mod tests {
 | 
				
			|||||||
	use network::PeerId;
 | 
						use network::PeerId;
 | 
				
			||||||
	use tests::helpers::*;
 | 
						use tests::helpers::*;
 | 
				
			||||||
	use tests::snapshot::TestSnapshotService;
 | 
						use tests::snapshot::TestSnapshotService;
 | 
				
			||||||
	use util::{U256, Address, RwLock};
 | 
						use parking_lot::RwLock;
 | 
				
			||||||
 | 
						use util::{U256, Address};
 | 
				
			||||||
	use util::hash::H256;
 | 
						use util::hash::H256;
 | 
				
			||||||
	use util::bytes::Bytes;
 | 
						use util::bytes::Bytes;
 | 
				
			||||||
	use rlp::{Rlp, RlpStream, UntrustedRlp};
 | 
						use rlp::{Rlp, RlpStream, UntrustedRlp};
 | 
				
			||||||
 | 
				
			|||||||
@ -45,7 +45,8 @@ use light::net::{
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
use light::request::{self, CompleteHeadersRequest as HeadersRequest};
 | 
					use light::request::{self, CompleteHeadersRequest as HeadersRequest};
 | 
				
			||||||
use network::PeerId;
 | 
					use network::PeerId;
 | 
				
			||||||
use util::{U256, H256, Mutex, RwLock};
 | 
					use util::{U256, H256};
 | 
				
			||||||
 | 
					use parking_lot::{Mutex, RwLock};
 | 
				
			||||||
use rand::{Rng, OsRng};
 | 
					use rand::{Rng, OsRng};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use self::sync_round::{AbortReason, SyncRound, ResponseContext};
 | 
					use self::sync_round::{AbortReason, SyncRound, ResponseContext};
 | 
				
			||||||
 | 
				
			|||||||
@ -29,7 +29,7 @@ use light::client::Client as LightClient;
 | 
				
			|||||||
use light::net::{LightProtocol, IoContext, Capabilities, Params as LightParams};
 | 
					use light::net::{LightProtocol, IoContext, Capabilities, Params as LightParams};
 | 
				
			||||||
use light::provider::LightProvider;
 | 
					use light::provider::LightProvider;
 | 
				
			||||||
use network::{NodeId, PeerId};
 | 
					use network::{NodeId, PeerId};
 | 
				
			||||||
use util::RwLock;
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use time::Duration;
 | 
					use time::Duration;
 | 
				
			||||||
use light::cache::Cache;
 | 
					use light::cache::Cache;
 | 
				
			||||||
 | 
				
			|||||||
@ -16,6 +16,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use std::collections::{VecDeque, HashSet, HashMap};
 | 
					use std::collections::{VecDeque, HashSet, HashMap};
 | 
				
			||||||
use std::sync::Arc;
 | 
					use std::sync::Arc;
 | 
				
			||||||
 | 
					use parking_lot::RwLock;
 | 
				
			||||||
use util::*;
 | 
					use util::*;
 | 
				
			||||||
use network::*;
 | 
					use network::*;
 | 
				
			||||||
use tests::snapshot::*;
 | 
					use tests::snapshot::*;
 | 
				
			||||||
 | 
				
			|||||||
@ -17,6 +17,7 @@
 | 
				
			|||||||
use std::collections::HashMap;
 | 
					use std::collections::HashMap;
 | 
				
			||||||
use std::sync::Arc;
 | 
					use std::sync::Arc;
 | 
				
			||||||
use hash::keccak;
 | 
					use hash::keccak;
 | 
				
			||||||
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
use util::*;
 | 
					use util::*;
 | 
				
			||||||
use ethcore::snapshot::{SnapshotService, ManifestData, RestorationStatus};
 | 
					use ethcore::snapshot::{SnapshotService, ManifestData, RestorationStatus};
 | 
				
			||||||
use ethcore::header::BlockNumber;
 | 
					use ethcore::header::BlockNumber;
 | 
				
			||||||
 | 
				
			|||||||
@ -17,6 +17,7 @@ ethcore = { path = "../ethcore" }
 | 
				
			|||||||
ethsync = { path = "../sync" }
 | 
					ethsync = { path = "../sync" }
 | 
				
			||||||
ethcore-util = { path = "../util" }
 | 
					ethcore-util = { path = "../util" }
 | 
				
			||||||
futures = "0.1"
 | 
					futures = "0.1"
 | 
				
			||||||
 | 
					parking_lot = "0.4"
 | 
				
			||||||
parity-hash-fetch = { path = "../hash-fetch" }
 | 
					parity-hash-fetch = { path = "../hash-fetch" }
 | 
				
			||||||
ipc-common-types = { path = "../ipc-common-types" }
 | 
					ipc-common-types = { path = "../ipc-common-types" }
 | 
				
			||||||
ethcore-ipc = { path = "../ipc/rpc" }
 | 
					ethcore-ipc = { path = "../ipc/rpc" }
 | 
				
			||||||
 | 
				
			|||||||
@ -19,6 +19,7 @@
 | 
				
			|||||||
#[macro_use] extern crate log;
 | 
					#[macro_use] extern crate log;
 | 
				
			||||||
extern crate ethcore_util as util;
 | 
					extern crate ethcore_util as util;
 | 
				
			||||||
extern crate ipc_common_types;
 | 
					extern crate ipc_common_types;
 | 
				
			||||||
 | 
					extern crate parking_lot;
 | 
				
			||||||
extern crate parity_hash_fetch as hash_fetch;
 | 
					extern crate parity_hash_fetch as hash_fetch;
 | 
				
			||||||
extern crate ethcore;
 | 
					extern crate ethcore;
 | 
				
			||||||
extern crate ethabi;
 | 
					extern crate ethabi;
 | 
				
			||||||
 | 
				
			|||||||
@ -31,7 +31,8 @@ use path::restrict_permissions_owner;
 | 
				
			|||||||
use service::{Service};
 | 
					use service::{Service};
 | 
				
			||||||
use target_info::Target;
 | 
					use target_info::Target;
 | 
				
			||||||
use types::all::{ReleaseInfo, OperationsInfo, CapState};
 | 
					use types::all::{ReleaseInfo, OperationsInfo, CapState};
 | 
				
			||||||
use util::{Address, H160, H256, Mutex, Bytes};
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					use util::{Address, H160, H256, Bytes};
 | 
				
			||||||
use util::misc;
 | 
					use util::misc;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Filter for releases.
 | 
					/// Filter for releases.
 | 
				
			||||||
 | 
				
			|||||||
@ -19,7 +19,8 @@ use std::sync::atomic::{AtomicBool, Ordering as AtomicOrdering};
 | 
				
			|||||||
use std::sync::Arc;
 | 
					use std::sync::Arc;
 | 
				
			||||||
use std::thread;
 | 
					use std::thread;
 | 
				
			||||||
use std::time::*;
 | 
					use std::time::*;
 | 
				
			||||||
use util::{Bytes, Mutex};
 | 
					use parking_lot::Mutex;
 | 
				
			||||||
 | 
					use util::Bytes;
 | 
				
			||||||
use io::TimerToken;
 | 
					use io::TimerToken;
 | 
				
			||||||
use ethkey::{Random, Generator};
 | 
					use ethkey::{Random, Generator};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -145,7 +145,5 @@ pub use vector::*;
 | 
				
			|||||||
pub use bigint::prelude::*;
 | 
					pub use bigint::prelude::*;
 | 
				
			||||||
pub use bigint::hash;
 | 
					pub use bigint::hash;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pub use parking_lot::{Condvar, Mutex, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/// 160-bit integer representing account address
 | 
					/// 160-bit integer representing account address
 | 
				
			||||||
pub type Address = H160;
 | 
					pub type Address = H160;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user