Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Fix style in #364 (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaka authored and arkpar committed Jul 18, 2018
1 parent fc126da commit 2eb32a3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
21 changes: 15 additions & 6 deletions substrate/network-libp2p/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,13 @@ fn init_thread(

trace!(target: "sub-libp2p", "Dialing bootnode {:?}", peer_id);
for proto in shared.protocols.read().0.clone().into_iter() {
open_peer_custom_proto(shared.clone(), transport.clone(),
proto, peer_id.clone(), &swarm_controller)
open_peer_custom_proto(
shared.clone(),
transport.clone(),
proto,
peer_id.clone(),
&swarm_controller
)
}
}

Expand Down Expand Up @@ -843,8 +848,7 @@ fn start_kademlia_discovery<T, To, St, C>(shared: Arc<Shared>, transport: T,
.for_each({
let shared = shared.clone();
move |_| {
connect_to_nodes(shared.clone(), transport.clone(),
&swarm_controller);
connect_to_nodes(shared.clone(), transport.clone(), &swarm_controller);
Ok(())
}
});
Expand Down Expand Up @@ -940,8 +944,13 @@ fn connect_to_nodes<T, To, St, C>(
// should automatically open multiple substreams.
trace!(target: "sub-libp2p", "Ensuring connection to {:?}", peer);
for proto in shared.protocols.read().0.clone().into_iter() {
open_peer_custom_proto(shared.clone(), base_transport.clone(),
proto, peer.clone(), swarm_controller)
open_peer_custom_proto(
shared.clone(),
base_transport.clone(),
proto,
peer.clone(),
swarm_controller
)
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions substrate/network-libp2p/src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ pub fn build_transport(

TransportTimeout::new(base, Duration::from_secs(20))
.map_err(|err| {
debug!(target: "sub-libp2p", "Error in base transport \
layer: {:?}", err);
debug!(target: "sub-libp2p", "Error in base transport layer: {:?}", err);
err
})
}
Expand Down

0 comments on commit 2eb32a3

Please sign in to comment.