The NodeId is always available in the session info (#859)

This commit is contained in:
Pierre Krieger
2018-10-01 19:31:07 +02:00
committed by Gav Wood
parent a21b2bfbb8
commit d14700f7b6
7 changed files with 10 additions and 18 deletions
+2 -4
View File
@@ -500,10 +500,8 @@ impl<B: BlockT, S: Specialization<B>, H: ExHashT> Protocol<B, S, H> {
.unzip();
if !to_send.is_empty() {
let node_id = io.peer_session_info(*who).map(|info| match info.id {
Some(id) => format!("{}@{:x}", info.remote_address, id),
None => info.remote_address.clone(),
});
let node_id = io.peer_session_info(*who)
.map(|info| format!("{}@{:?}", info.remote_address, info.id));
if let Some(id) = node_id {
for hash in hashes {