fix merge

This commit is contained in:
keorn 2016-11-14 11:09:57 +00:00
parent 501f6d3f49
commit b5c891814a
4 changed files with 8 additions and 8 deletions

View File

@ -296,7 +296,10 @@ impl Engine for AuthorityRound {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use common::*; use util::*;
use env_info::EnvInfo;
use header::Header;
use error::{Error, BlockError};
use rlp::encode; use rlp::encode;
use block::*; use block::*;
use tests::helpers::*; use tests::helpers::*;
@ -379,7 +382,7 @@ mod tests {
header.set_author(addr); 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 timestamp = UNIX_EPOCH.elapsed().unwrap().as_secs();
let step = timestamp + timestamp % 2 + 1; let step = timestamp + timestamp % 2 + 1;
header.set_seal(vec![encode(&step).to_vec(), encode(&(&*signature as &[u8])).to_vec()]); header.set_seal(vec![encode(&step).to_vec(), encode(&(&*signature as &[u8])).to_vec()]);

View File

@ -155,9 +155,8 @@ mod blockchain;
mod types; mod types;
mod factory; mod factory;
//#[cfg(test)] #[cfg(test)]
#[allow(missing_docs)] mod tests;
pub mod tests;
#[cfg(test)] #[cfg(test)]
#[cfg(feature="json-tests")] #[cfg(feature="json-tests")]
mod json_tests; mod json_tests;

View File

@ -23,6 +23,7 @@ use state_db::StateDB;
use block::{OpenBlock, Drain}; use block::{OpenBlock, Drain};
use blockchain::{BlockChain, Config as BlockChainConfig}; use blockchain::{BlockChain, Config as BlockChainConfig};
use builtin::Builtin; use builtin::Builtin;
use state::*;
use evm::Schedule; use evm::Schedule;
use engines::Engine; use engines::Engine;
use env_info::EnvInfo; use env_info::EnvInfo;
@ -339,7 +340,6 @@ pub fn get_temp_state_db() -> GuardedTempResult<StateDB> {
} }
} }
#[cfg(test)]
pub fn get_temp_state() -> GuardedTempResult<State> { pub fn get_temp_state() -> GuardedTempResult<State> {
let temp = RandomTempPath::new(); let temp = RandomTempPath::new();
let journal_db = get_temp_state_db_in(temp.as_path()); 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) StateDB::new(journal_db, 5 * 1024 * 1024)
} }
#[cfg(test)]
pub fn get_temp_state_in(path: &Path) -> State { pub fn get_temp_state_in(path: &Path) -> State {
let journal_db = get_temp_state_db_in(path); let journal_db = get_temp_state_db_in(path);
State::new(journal_db, U256::from(0), Default::default()) State::new(journal_db, U256::from(0), Default::default())

View File

@ -15,7 +15,6 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>. // along with Parity. If not, see <http://www.gnu.org/licenses/>.
pub mod helpers; pub mod helpers;
#[cfg(test)]
mod client; mod client;
#[cfg(feature="ipc")] #[cfg(feature="ipc")]
mod rpc; mod rpc;