removed unused cfg options
This commit is contained in:
parent
38164d6b21
commit
1897d55a79
@ -2,7 +2,6 @@ use client::{BlockChainClient,Client};
|
|||||||
use super::test_common::*;
|
use super::test_common::*;
|
||||||
use super::helpers::*;
|
use super::helpers::*;
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
fn get_good_dummy_block() -> Bytes {
|
fn get_good_dummy_block() -> Bytes {
|
||||||
let mut block_header = Header::new();
|
let mut block_header = Header::new();
|
||||||
let test_spec = get_test_spec();
|
let test_spec = get_test_spec();
|
||||||
@ -17,7 +16,6 @@ fn get_good_dummy_block() -> Bytes {
|
|||||||
create_test_block(&block_header)
|
create_test_block(&block_header)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
fn get_bad_state_dummy_block() -> Bytes {
|
fn get_bad_state_dummy_block() -> Bytes {
|
||||||
let mut block_header = Header::new();
|
let mut block_header = Header::new();
|
||||||
let test_spec = get_test_spec();
|
let test_spec = get_test_spec();
|
||||||
@ -33,7 +31,6 @@ fn get_bad_state_dummy_block() -> Bytes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
fn get_test_client_with_blocks(blocks: Vec<Bytes>) -> Arc<Client> {
|
fn get_test_client_with_blocks(blocks: Vec<Bytes>) -> Arc<Client> {
|
||||||
let client = Client::new(get_test_spec(), &get_random_path(), IoChannel::disconnected()).unwrap();
|
let client = Client::new(get_test_spec(), &get_random_path(), IoChannel::disconnected()).unwrap();
|
||||||
for block in &blocks {
|
for block in &blocks {
|
||||||
|
@ -5,11 +5,10 @@ use std::path::PathBuf;
|
|||||||
use spec::*;
|
use spec::*;
|
||||||
use std::fs::{create_dir_all};
|
use std::fs::{create_dir_all};
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
const FIXED_TEMP_DIR_NAME: &'static str = "parity-temp";
|
const FIXED_TEMP_DIR_NAME: &'static str = "parity-temp";
|
||||||
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
pub fn get_tests_temp_dir() -> PathBuf {
|
pub fn get_tests_temp_dir() -> PathBuf {
|
||||||
let mut dir = env::temp_dir();
|
let mut dir = env::temp_dir();
|
||||||
dir.push(FIXED_TEMP_DIR_NAME);
|
dir.push(FIXED_TEMP_DIR_NAME);
|
||||||
@ -19,7 +18,6 @@ pub fn get_tests_temp_dir() -> PathBuf {
|
|||||||
dir
|
dir
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
pub fn get_random_path() -> PathBuf {
|
pub fn get_random_path() -> PathBuf {
|
||||||
let mut dir = get_tests_temp_dir();
|
let mut dir = get_tests_temp_dir();
|
||||||
dir.push(H32::random().hex());
|
dir.push(H32::random().hex());
|
||||||
@ -27,13 +25,11 @@ pub fn get_random_path() -> PathBuf {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
pub fn get_test_spec() -> Spec {
|
pub fn get_test_spec() -> Spec {
|
||||||
Spec::new_test()
|
Spec::new_test()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
pub fn create_test_block(header: &Header) -> Bytes {
|
pub fn create_test_block(header: &Header) -> Bytes {
|
||||||
let mut rlp = RlpStream::new_list(3);
|
let mut rlp = RlpStream::new_list(3);
|
||||||
rlp.append(header);
|
rlp.append(header);
|
||||||
@ -42,7 +38,6 @@ pub fn create_test_block(header: &Header) -> Bytes {
|
|||||||
rlp.out()
|
rlp.out()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
pub fn generate_dummy_client(block_number: usize) -> Arc<Client> {
|
pub fn generate_dummy_client(block_number: usize) -> Arc<Client> {
|
||||||
let client = Client::new(get_test_spec(), &get_random_path(), IoChannel::disconnected()).unwrap();
|
let client = Client::new(get_test_spec(), &get_random_path(), IoChannel::disconnected()).unwrap();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user