[ethcore]: move client test types to test-helpers (#11062)
This commit is contained in:
committed by
Andrew Jones
parent
acad59b300
commit
b6415c6196
@@ -636,15 +636,15 @@ fn all_expected<A, B, F>(values: &[A], expected_values: &[B], is_expected: F) ->
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use ethcore::client::TestBlockChainClient;
|
||||
use ethcore::test_helpers::TestBlockChainClient;
|
||||
use spec;
|
||||
use ethkey::{Generator,Random};
|
||||
use ethkey::{Generator, Random};
|
||||
use hash::keccak;
|
||||
use parking_lot::RwLock;
|
||||
use rlp::{encode_list,RlpStream};
|
||||
use rlp::{encode_list, RlpStream};
|
||||
use tests::helpers::TestIo;
|
||||
use tests::snapshot::TestSnapshotService;
|
||||
use types::transaction::{Transaction,SignedTransaction};
|
||||
use types::transaction::{Transaction, SignedTransaction};
|
||||
use triehash_ethereum::ordered_trie_root;
|
||||
use types::header::Header as BlockHeader;
|
||||
|
||||
|
||||
@@ -544,7 +544,7 @@ impl BlockCollection {
|
||||
mod test {
|
||||
use super::{BlockCollection, SyncHeader};
|
||||
use client_traits::BlockChainClient;
|
||||
use ethcore::client::{TestBlockChainClient, EachBlockWith};
|
||||
use ethcore::test_helpers::{TestBlockChainClient, EachBlockWith};
|
||||
use types::{
|
||||
ids::BlockId,
|
||||
BlockNumber,
|
||||
|
||||
@@ -801,11 +801,11 @@ impl SyncHandler {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use client_traits::ChainInfo;
|
||||
use ethcore::client::{EachBlockWith, TestBlockChainClient};
|
||||
use ethcore::test_helpers::{EachBlockWith, TestBlockChainClient};
|
||||
use parking_lot::RwLock;
|
||||
use rlp::Rlp;
|
||||
use std::collections::{VecDeque};
|
||||
use tests::helpers::{TestIo};
|
||||
use std::collections::VecDeque;
|
||||
use tests::helpers::TestIo;
|
||||
use tests::snapshot::TestSnapshotService;
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -1408,7 +1408,7 @@ pub mod tests {
|
||||
use std::collections::{VecDeque};
|
||||
use ethkey;
|
||||
use network::PeerId;
|
||||
use tests::helpers::{TestIo};
|
||||
use tests::helpers::TestIo;
|
||||
use tests::snapshot::TestSnapshotService;
|
||||
use ethereum_types::{H256, U256, Address};
|
||||
use parking_lot::RwLock;
|
||||
@@ -1417,7 +1417,7 @@ pub mod tests {
|
||||
use super::*;
|
||||
use ::SyncConfig;
|
||||
use super::{PeerInfo, PeerAsking};
|
||||
use ethcore::client::{EachBlockWith, TestBlockChainClient};
|
||||
use ethcore::test_helpers::{EachBlockWith, TestBlockChainClient};
|
||||
use client_traits::{BlockInfo, BlockChainClient, ChainInfo};
|
||||
use ethcore::miner::{MinerService, PendingOrdering};
|
||||
use types::header::Header;
|
||||
|
||||
@@ -336,7 +336,7 @@ impl SyncPropagator {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use client_traits::{BlockInfo, ChainInfo};
|
||||
use ethcore::client::{EachBlockWith, TestBlockChainClient};
|
||||
use ethcore::test_helpers::{EachBlockWith, TestBlockChainClient};
|
||||
use parking_lot::RwLock;
|
||||
use rlp::Rlp;
|
||||
use std::collections::VecDeque;
|
||||
|
||||
@@ -394,17 +394,17 @@ impl SyncSupplier {
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use std::collections::{VecDeque};
|
||||
use tests::helpers::{TestIo};
|
||||
use std::collections::VecDeque;
|
||||
use tests::helpers::TestIo;
|
||||
use tests::snapshot::TestSnapshotService;
|
||||
use ethereum_types::{H256};
|
||||
use ethereum_types::H256;
|
||||
use parking_lot::RwLock;
|
||||
use bytes::Bytes;
|
||||
use rlp::{Rlp, RlpStream};
|
||||
use super::{*, super::tests::*};
|
||||
use blocks::SyncHeader;
|
||||
use client_traits::BlockChainClient;
|
||||
use ethcore::client::{EachBlockWith, TestBlockChainClient};
|
||||
use ethcore::test_helpers::{EachBlockWith, TestBlockChainClient};
|
||||
use std::str::FromStr;
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
use tests::helpers::TestNet;
|
||||
|
||||
use ethcore::client::EachBlockWith;
|
||||
use ethcore::test_helpers::EachBlockWith;
|
||||
use client_traits::BlockInfo;
|
||||
use types::ids::BlockId;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ use std::sync::Arc;
|
||||
use light_sync::*;
|
||||
use tests::helpers::{TestNet, Peer as PeerLike, TestPacket};
|
||||
|
||||
use ethcore::client::TestBlockChainClient;
|
||||
use ethcore::test_helpers::TestBlockChainClient;
|
||||
use spec;
|
||||
use io::IoChannel;
|
||||
use kvdb_memorydb;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
use std::sync::Arc;
|
||||
use types::ids::BlockId;
|
||||
use client_traits::{BlockChainClient, ChainInfo};
|
||||
use ethcore::client::{TestBlockChainClient, EachBlockWith};
|
||||
use ethcore::test_helpers::{TestBlockChainClient, EachBlockWith};
|
||||
use client_traits::BlockInfo;
|
||||
use chain::SyncState;
|
||||
use super::helpers::*;
|
||||
|
||||
@@ -27,10 +27,9 @@ use types::{
|
||||
io_message::ClientIoMessage,
|
||||
};
|
||||
use client_traits::{BlockChainClient, ChainNotify};
|
||||
use ethcore::client::{
|
||||
TestBlockChainClient,
|
||||
Client as EthcoreClient,
|
||||
ClientConfig,
|
||||
use ethcore::{
|
||||
client::{Client as EthcoreClient, ClientConfig},
|
||||
test_helpers::TestBlockChainClient
|
||||
};
|
||||
use snapshot::SnapshotService;
|
||||
use spec::{self, Spec};
|
||||
|
||||
@@ -21,7 +21,7 @@ use ethereum_types::H256;
|
||||
use parking_lot::Mutex;
|
||||
use bytes::Bytes;
|
||||
use snapshot::SnapshotService;
|
||||
use ethcore::client::EachBlockWith;
|
||||
use ethcore::test_helpers::EachBlockWith;
|
||||
use types::{
|
||||
BlockNumber,
|
||||
snapshot::{ManifestData, RestorationStatus},
|
||||
|
||||
Reference in New Issue
Block a user