diff --git a/ethcore/src/engines/authority_round.rs b/ethcore/src/engines/authority_round.rs index 0165b4e17..e5dc0934e 100644 --- a/ethcore/src/engines/authority_round.rs +++ b/ethcore/src/engines/authority_round.rs @@ -296,7 +296,10 @@ impl Engine for AuthorityRound { #[cfg(test)] mod tests { - use common::*; + use util::*; + use env_info::EnvInfo; + use header::Header; + use error::{Error, BlockError}; use rlp::encode; use block::*; use tests::helpers::*; @@ -379,7 +382,7 @@ mod tests { header.set_author(addr); - let signature = tap.sign_with_password(addr, "0".into(), header.bare_hash()).unwrap(); + let signature = tap.sign(addr, Some("0".into()), header.bare_hash()).unwrap(); let timestamp = UNIX_EPOCH.elapsed().unwrap().as_secs(); let step = timestamp + timestamp % 2 + 1; header.set_seal(vec![encode(&step).to_vec(), encode(&(&*signature as &[u8])).to_vec()]); diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index c7c92a6f9..bf3e59171 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -155,9 +155,8 @@ mod blockchain; mod types; mod factory; -//#[cfg(test)] -#[allow(missing_docs)] -pub mod tests; +#[cfg(test)] +mod tests; #[cfg(test)] #[cfg(feature="json-tests")] mod json_tests; diff --git a/ethcore/src/tests/helpers.rs b/ethcore/src/tests/helpers.rs index 3d2ca6b3e..96d5f8366 100644 --- a/ethcore/src/tests/helpers.rs +++ b/ethcore/src/tests/helpers.rs @@ -23,6 +23,7 @@ use state_db::StateDB; use block::{OpenBlock, Drain}; use blockchain::{BlockChain, Config as BlockChainConfig}; use builtin::Builtin; +use state::*; use evm::Schedule; use engines::Engine; use env_info::EnvInfo; @@ -339,7 +340,6 @@ pub fn get_temp_state_db() -> GuardedTempResult { } } -#[cfg(test)] pub fn get_temp_state() -> GuardedTempResult { let temp = RandomTempPath::new(); let journal_db = get_temp_state_db_in(temp.as_path()); @@ -356,7 +356,6 @@ pub fn get_temp_state_db_in(path: &Path) -> StateDB { StateDB::new(journal_db, 5 * 1024 * 1024) } -#[cfg(test)] pub fn get_temp_state_in(path: &Path) -> State { let journal_db = get_temp_state_db_in(path); State::new(journal_db, U256::from(0), Default::default()) diff --git a/ethcore/src/tests/mod.rs b/ethcore/src/tests/mod.rs index 86266c1d0..4157e486d 100644 --- a/ethcore/src/tests/mod.rs +++ b/ethcore/src/tests/mod.rs @@ -15,7 +15,6 @@ // along with Parity. If not, see . pub mod helpers; -#[cfg(test)] mod client; #[cfg(feature="ipc")] mod rpc;