remove re-export of parking_lot in util (#6435)

This commit is contained in:
Hawstein
2017-09-03 02:09:13 +08:00
committed by Gav Wood
parent 1d95fe481f
commit 7b8af30590
99 changed files with 161 additions and 75 deletions

View File

@@ -23,7 +23,7 @@ use self::stores::{AddressBook, DappsSettingsStore, NewDappsPolicy};
use std::fmt;
use std::collections::{HashMap, HashSet};
use std::time::{Instant, Duration};
use util::{RwLock};
use parking_lot::RwLock;
use ethstore::{
SimpleSecretStore, SecretStore, Error as SSError, EthStore, EthMultiStore,
random_string, SecretVaultRef, StoreAccountRef, OpaqueSecret,

View File

@@ -22,6 +22,7 @@ use std::mem;
use itertools::Itertools;
use bloomchain as bc;
use heapsize::HeapSizeOf;
use parking_lot::{Mutex, RwLock};
use util::*;
use rlp::*;
use header::*;

View File

@@ -23,7 +23,7 @@ use engines::{Engine, EpochVerifier};
use header::Header;
use rand::Rng;
use util::RwLock;
use parking_lot::RwLock;
// do "heavy" verification on ~1/50 blocks, randomly sampled.
const HEAVY_VERIFY_RATE: f32 = 0.02;

View File

@@ -25,7 +25,7 @@ use itertools::Itertools;
// util
use hash::keccak;
use timer::PerfTimer;
use util::{Bytes, Mutex, RwLock, MutexGuard};
use util::Bytes;
use util::{journaldb, DBValue, TrieFactory, Trie};
use util::{U256, H256, Address, H2048};
use util::trie::TrieSpec;
@@ -56,6 +56,7 @@ use io::*;
use log_entry::LocalizedLogEntry;
use miner::{Miner, MinerService, TransactionImportResult};
use native_contracts::Registry;
use parking_lot::{Mutex, RwLock, MutexGuard};
use rand::OsRng;
use receipt::{Receipt, LocalizedReceipt};
use rlp::UntrustedRlp;

View File

@@ -23,6 +23,7 @@ use std::mem;
use itertools::Itertools;
use rustc_hex::FromHex;
use hash::keccak;
use parking_lot::RwLock;
use util::*;
use rlp::*;
use ethkey::{Generator, Random};

View File

@@ -19,7 +19,8 @@
use std::ops::Deref;
use std::hash::Hash;
use std::collections::HashMap;
use util::{DBTransaction, KeyValueDB, RwLock};
use parking_lot::RwLock;
use util::{DBTransaction, KeyValueDB};
use rlp;

View File

@@ -43,6 +43,7 @@ use io::{IoContext, IoHandler, TimerToken, IoService};
use itertools::{self, Itertools};
use rlp::{UntrustedRlp, encode};
use semantic_version::SemanticVersion;
use parking_lot::{Mutex, RwLock};
use util::*;
mod finality;

View File

@@ -19,6 +19,7 @@
use std::sync::{Weak, Arc};
use std::collections::BTreeMap;
use std::cmp;
use parking_lot::RwLock;
use util::*;
use ethkey::{recover, public_to_address, Signature};
use account_provider::AccountProvider;

View File

@@ -30,6 +30,7 @@ use std::sync::atomic::{AtomicUsize, Ordering as AtomicOrdering};
use std::collections::{HashSet, BTreeMap, HashMap};
use hash::keccak;
use std::cmp;
use parking_lot::RwLock;
use util::*;
use client::{Client, EngineClient};
use error::{Error, BlockError};

View File

@@ -18,6 +18,7 @@
/// It can also report validators for misbehaviour with two levels: `reportMalicious` and `reportBenign`.
use std::sync::Weak;
use parking_lot::RwLock;
use util::*;
use futures::Future;

View File

@@ -19,7 +19,8 @@
use std::collections::BTreeMap;
use std::sync::Weak;
use engines::{Call, Engine};
use util::{Bytes, H256, Address, RwLock};
use parking_lot::RwLock;
use util::{Bytes, H256, Address};
use ids::BlockId;
use header::{BlockNumber, Header};
use client::{Client, BlockChainClient};

View File

@@ -21,6 +21,7 @@ use futures::Future;
use native_contracts::ValidatorSet as Provider;
use hash::keccak;
use parking_lot::RwLock;
use util::*;
use util::cache::MemoryLruCache;
use rlp::{UntrustedRlp, RlpStream};

View File

@@ -19,6 +19,7 @@
use std::fmt::Debug;
use std::collections::{BTreeMap, HashSet, HashMap};
use std::hash::Hash;
use parking_lot:: RwLock;
use util::*;
use rlp::{Encodable, RlpStream};

View File

@@ -98,6 +98,7 @@ extern crate lru_cache;
extern crate native_contracts;
extern crate num_cpus;
extern crate num;
extern crate parking_lot;
extern crate price_info;
extern crate rand;
extern crate rlp;

View File

@@ -17,7 +17,8 @@
use std::collections::HashMap;
use std::sync::Arc;
use std::time::{Instant, Duration};
use util::{Mutex, U256, H256};
use util::{U256, H256};
use parking_lot::Mutex;
/// External miner interface.
pub trait ExternalMinerService: Send + Sync {

View File

@@ -18,6 +18,7 @@ use std::time::{Instant, Duration};
use std::collections::{BTreeMap, HashSet};
use std::sync::Arc;
use parking_lot::{Mutex, RwLock};
use util::*;
use timer::PerfTimer;
use using_queue::{UsingQueue, GetAction};

View File

@@ -20,7 +20,8 @@ use types::ids::BlockId;
use futures::{future, Future};
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";

View File

@@ -28,7 +28,7 @@ use std::fmt;
use util::{H256, U256, H64, clean_0x};
use ethereum::ethash::Ethash;
use ethash::SeedHashCompute;
use util::Mutex;
use parking_lot::Mutex;
use miner::{self, Miner, MinerService};
use client::Client;
use block::IsBlock;

View File

@@ -24,6 +24,7 @@ use hyper::{Next};
use hyper::net::HttpStream;
use ethash::SeedHashCompute;
use hyper::Url;
use parking_lot::Mutex;
use util::*;
use ethereum::ethash::Ethash;

View File

@@ -31,7 +31,7 @@ use header::Header;
use ids::BlockId;
use util::{Bytes, HashDB, DBValue, snappy, U256};
use util::Mutex;
use parking_lot::Mutex;
use util::hash::{H256};
use util::journaldb::{self, Algorithm, JournalDB};
use util::kvdb::KeyValueDB;

View File

@@ -35,7 +35,8 @@ use service::ClientIoMessage;
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::kvdb::{Database, DatabaseConfig};
use util::snappy;

View File

@@ -24,7 +24,8 @@ use blockchain::BlockChain;
use snapshot::{chunk_secondary, Error as SnapshotError, Progress, SnapshotComponents};
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 std::sync::Arc;

View File

@@ -29,7 +29,7 @@ use util::hash::H256;
use util::journaldb::{self, Algorithm};
use util::kvdb::{Database, DatabaseConfig};
use util::memorydb::MemoryDB;
use util::Mutex;
use parking_lot::Mutex;
use devtools::RandomTempPath;
use std::sync::Arc;

View File

@@ -16,7 +16,7 @@
//! Watcher for snapshot-related chain events.
use util::Mutex;
use parking_lot::Mutex;
use client::{BlockChainClient, Client, ChainNotify};
use ids::BlockId;
use service::ClientIoMessage;

View File

@@ -40,6 +40,7 @@ use state_db::StateDB;
use state::{Backend, State, Substate};
use state::backend::Basic as BasicBackend;
use trace::{NoopTracer, NoopVMTracer};
use parking_lot::RwLock;
use util::*;
/// Parameters common to ethereum-like blockchains.

View File

@@ -25,7 +25,8 @@ use std::collections::{HashSet, HashMap};
use std::sync::Arc;
use state::Account;
use util::{Address, MemoryDB, Mutex, H256};
use parking_lot::Mutex;
use util::{Address, MemoryDB, H256};
use util::hashdb::{AsHashDB, HashDB, DBValue};
/// State backend. See module docs for more details.

View File

@@ -25,7 +25,8 @@ use util::hashdb::HashDB;
use state::{self, Account};
use header::BlockNumber;
use hash::keccak;
use util::{Address, DBTransaction, UtilError, Mutex};
use parking_lot::Mutex;
use util::{Address, DBTransaction, UtilError};
use bloom_journal::{Bloom, BloomJournal};
use db::COL_ACCOUNT_BLOOM;
use byteorder::{LittleEndian, ByteOrder};

View File

@@ -21,7 +21,8 @@ use std::sync::Arc;
use bloomchain::{Number, Config as BloomConfig};
use bloomchain::group::{BloomGroupDatabase, BloomGroupChain, GroupPosition, BloomGroup};
use heapsize::HeapSizeOf;
use util::{H256, H264, KeyValueDB, DBTransaction, RwLock};
use parking_lot::RwLock;
use util::{H256, H264, KeyValueDB, DBTransaction};
use header::BlockNumber;
use trace::{LocalizedTrace, Config, Filter, Database as TraceDatabase, ImportRequest, DatabaseExtras};
use db::{self, Key, Writable, Readable, CacheUpdatePolicy};

View File

@@ -23,6 +23,7 @@ use std::sync::{Condvar as SCondvar, Mutex as SMutex, Arc};
use std::cmp;
use std::collections::{VecDeque, HashSet, HashMap};
use heapsize::HeapSizeOf;
use parking_lot::{Condvar, Mutex, RwLock};
use util::*;
use io::*;
use error::*;