increase tick timer and limit peers to one req

This commit is contained in:
Robert Habermeier
2016-12-19 12:28:42 +01:00
parent 5b0531e964
commit ccdf5d5873
3 changed files with 32 additions and 13 deletions

View File

@@ -417,8 +417,6 @@ impl<L: LightChainClient> LightSync<L> {
rng.shuffle(&mut peer_ids);
for peer in &peer_ids {
let peer_info = peers.get(peer).expect("key known to be present; qed");
let mut peer_info = peer_info.lock();
if ctx.max_requests(*peer, request::Kind::Headers) >= req.max {
match ctx.request_from(*peer, request::Request::Headers(req.clone())) {
Ok(id) => {