fixed master (#6465)

* fixed master

* Revert "Merge pull request #6370 from paritytech/light-poa"

This reverts commit 3c60f99def, reversing
changes made to b731ccea18.
This commit is contained in:
Marek Kotewicz
2017-09-05 14:53:09 +02:00
committed by Arkadiy Paronyan
parent e5bbabb2ba
commit 899538ae25
41 changed files with 265 additions and 1269 deletions

View File

@@ -25,7 +25,7 @@ use tests::helpers::{TestNet, Peer as PeerLike, TestPacket};
use ethcore::client::TestBlockChainClient;
use ethcore::spec::Spec;
use io::IoChannel;
use light::client::fetch::{self, Unavailable};
use light::client::Client as LightClient;
use light::net::{LightProtocol, IoContext, Capabilities, Params as LightParams};
use light::provider::LightProvider;
use network::{NodeId, PeerId};
@@ -36,8 +36,6 @@ use light::cache::Cache;
const NETWORK_ID: u64 = 0xcafebabe;
pub type LightClient = ::light::client::Client<Unavailable>;
struct TestIoContext<'a> {
queue: &'a RwLock<VecDeque<TestPacket>>,
sender: Option<PeerId>,
@@ -218,14 +216,7 @@ impl TestNet<Peer> {
// skip full verification because the blocks are bad.
config.verify_full = false;
let cache = Arc::new(Mutex::new(Cache::new(Default::default(), Duration::hours(6))));
let client = LightClient::in_memory(
config,
&Spec::new_test(),
fetch::unavailable(), // TODO: allow fetch from full nodes.
IoChannel::disconnected(),
cache
);
let client = LightClient::in_memory(config, &Spec::new_test(), IoChannel::disconnected(), cache);
peers.push(Arc::new(Peer::new_light(Arc::new(client))))
}