From 64b1b898f132c12ed382aa70221089220564c8d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Mon, 28 Nov 2016 17:05:37 +0100 Subject: [PATCH] Fixing compilation on stable --- ethcore/src/executive.rs | 4 ++++ ethcore/src/miner/miner.rs | 3 +++ ethcore/src/miner/transaction_queue.rs | 1 + ethcore/src/state/account.rs | 2 +- sync/src/chain.rs | 6 ++++++ util/network/src/connection.rs | 1 + util/network/src/discovery.rs | 5 +++++ util/network/src/handshake.rs | 1 + util/network/src/node_table.rs | 2 ++ util/src/journaldb/archivedb.rs | 1 + util/src/journaldb/earlymergedb.rs | 1 + util/src/journaldb/overlayrecentdb.rs | 1 + util/src/journaldb/refcounteddb.rs | 1 + util/src/kvdb.rs | 1 + 14 files changed, 29 insertions(+), 1 deletion(-) diff --git a/ethcore/src/executive.rs b/ethcore/src/executive.rs index f9178f766..3344c0c0a 100644 --- a/ethcore/src/executive.rs +++ b/ethcore/src/executive.rs @@ -514,8 +514,12 @@ impl<'a> Executive<'a> { #[cfg(test)] #[allow(dead_code)] mod tests { + use std::sync::Arc; use ethkey::{Generator, Random}; use super::*; + use util::{H256, U256, U512, Address, Uint, FixedHash, FromHex, FromStr}; + use util::bytes::BytesRef; + use rlp::{UntrustedRlp, RlpType}; use action_params::{ActionParams, ActionValue}; use env_info::EnvInfo; use evm::{Factory, VMType}; diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index ef8508749..a543e608d 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -1141,9 +1141,12 @@ impl MinerService for Miner { #[cfg(test)] mod tests { + use std::sync::Arc; use std::time::Duration; use super::super::{MinerService, PrioritizationStrategy}; use super::*; + use block::IsBlock; + use util::{U256, Uint, FromHex}; use ethkey::{Generator, Random}; use client::{BlockChainClient, TestBlockChainClient, EachBlockWith, TransactionImportResult}; use header::BlockNumber; diff --git a/ethcore/src/miner/transaction_queue.rs b/ethcore/src/miner/transaction_queue.rs index b8dadee9e..cd2d3ba47 100644 --- a/ethcore/src/miner/transaction_queue.rs +++ b/ethcore/src/miner/transaction_queue.rs @@ -1217,6 +1217,7 @@ mod test { use super::{TransactionSet, TransactionOrder, VerifiedTransaction}; use miner::local_transactions::LocalTransactionsList; use client::TransactionImportResult; + use transaction::{SignedTransaction, Transaction, Action}; fn unwrap_tx_err(err: Result) -> TransactionError { match err.unwrap_err() { diff --git a/ethcore/src/state/account.rs b/ethcore/src/state/account.rs index 584ab0936..ca20d8900 100644 --- a/ethcore/src/state/account.rs +++ b/ethcore/src/state/account.rs @@ -445,7 +445,7 @@ impl fmt::Debug for Account { #[cfg(test)] mod tests { - + use rlp::{UntrustedRlp, RlpType, View, Compressible}; use util::*; use super::*; use account_db::*; diff --git a/sync/src/chain.rs b/sync/src/chain.rs index f4764c8b1..9f1b3c229 100644 --- a/sync/src/chain.rs +++ b/sync/src/chain.rs @@ -1998,8 +1998,14 @@ impl ChainSync { #[cfg(test)] mod tests { + use std::collections::{HashSet, VecDeque}; use tests::helpers::*; use tests::snapshot::TestSnapshotService; + use util::{U256, RwLock}; + use util::sha3::Hashable; + use util::hash::{H256, FixedHash}; + use util::bytes::Bytes; + use rlp::{Rlp, RlpStream, UntrustedRlp, View, Stream}; use super::*; use ::SyncConfig; use super::{PeerInfo, PeerAsking}; diff --git a/util/network/src/connection.rs b/util/network/src/connection.rs index b99b9931e..ea0763b09 100644 --- a/util/network/src/connection.rs +++ b/util/network/src/connection.rs @@ -507,6 +507,7 @@ mod tests { use std::io::{Read, Write, Error, Cursor, ErrorKind}; use mio::{Ready}; use std::collections::VecDeque; + use util::bytes::Bytes; use devtools::*; use io::*; diff --git a/util/network/src/discovery.rs b/util/network/src/discovery.rs index d92b576ab..996578af5 100644 --- a/util/network/src/discovery.rs +++ b/util/network/src/discovery.rs @@ -555,6 +555,11 @@ impl Discovery { #[cfg(test)] mod tests { use super::*; + use std::net::{SocketAddr}; + use util::sha3::Hashable; + use util::FixedHash; + use node_table::{Node, NodeId, NodeEndpoint}; + use std::str::FromStr; use rustc_serialize::hex::FromHex; use ethkey::{Random, Generator}; diff --git a/util/network/src/handshake.rs b/util/network/src/handshake.rs index 4c3c12f31..0eeda3b54 100644 --- a/util/network/src/handshake.rs +++ b/util/network/src/handshake.rs @@ -333,6 +333,7 @@ mod test { use std::sync::Arc; use rustc_serialize::hex::FromHex; use super::*; + use util::hash::{H256, FixedHash}; use io::*; use mio::tcp::TcpStream; use stats::NetworkStats; diff --git a/util/network/src/node_table.rs b/util/network/src/node_table.rs index ef37d5fea..ab7d17fa9 100644 --- a/util/network/src/node_table.rs +++ b/util/network/src/node_table.rs @@ -357,6 +357,8 @@ pub fn is_valid_node_url(url: &str) -> bool { #[cfg(test)] mod tests { use super::*; + use std::net::{SocketAddr, SocketAddrV4, Ipv4Addr}; + use util::H512; use std::str::FromStr; use devtools::*; use AllowIP; diff --git a/util/src/journaldb/archivedb.rs b/util/src/journaldb/archivedb.rs index 639f5f144..4c8d24701 100644 --- a/util/src/journaldb/archivedb.rs +++ b/util/src/journaldb/archivedb.rs @@ -235,6 +235,7 @@ mod tests { #![cfg_attr(feature="dev", allow(similar_names))] use common::*; + use hashdb::{HashDB, DBValue}; use super::*; use journaldb::traits::JournalDB; use kvdb::Database; diff --git a/util/src/journaldb/earlymergedb.rs b/util/src/journaldb/earlymergedb.rs index 9f62f90fa..60263a2cd 100644 --- a/util/src/journaldb/earlymergedb.rs +++ b/util/src/journaldb/earlymergedb.rs @@ -554,6 +554,7 @@ mod tests { #![cfg_attr(feature="dev", allow(similar_names))] use common::*; + use hashdb::{HashDB, DBValue}; use super::*; use super::super::traits::JournalDB; use log::init_log; diff --git a/util/src/journaldb/overlayrecentdb.rs b/util/src/journaldb/overlayrecentdb.rs index 542c59b32..34f942a0b 100644 --- a/util/src/journaldb/overlayrecentdb.rs +++ b/util/src/journaldb/overlayrecentdb.rs @@ -422,6 +422,7 @@ mod tests { use common::*; use super::*; + use hashdb::{HashDB, DBValue}; use log::init_log; use journaldb::JournalDB; use kvdb::Database; diff --git a/util/src/journaldb/refcounteddb.rs b/util/src/journaldb/refcounteddb.rs index 087318e83..82261965c 100644 --- a/util/src/journaldb/refcounteddb.rs +++ b/util/src/journaldb/refcounteddb.rs @@ -215,6 +215,7 @@ mod tests { #![cfg_attr(feature="dev", allow(similar_names))] use common::*; + use hashdb::{HashDB, DBValue}; use super::*; use super::super::traits::JournalDB; diff --git a/util/src/kvdb.rs b/util/src/kvdb.rs index d33f45612..de3b033ec 100644 --- a/util/src/kvdb.rs +++ b/util/src/kvdb.rs @@ -628,6 +628,7 @@ impl Drop for Database { #[cfg(test)] mod tests { + use hash::H256; use super::*; use devtools::*; use std::str::FromStr;