Complete merging of network addition branch

This commit is contained in:
Age Manning
2019-06-23 12:34:00 +10:00
parent cf459b60a9
commit 84ea5adffe
11 changed files with 12 additions and 22 deletions

View File

@@ -111,14 +111,16 @@ impl<TSubstream: AsyncRead + AsyncWrite> NetworkBehaviourEventProcess<IdentifyEv
);
info.listen_addrs.truncate(20);
}
self.events
.push(BehaviourEvent::Identified(peer_id, Box::new(info)));
trace!(self.log, "Found addresses"; "Peer Id" => format!("{:?}", peer_id), "Addresses" => format!("{:?}", info.listen_addrs));
// inject the found addresses into our discovery behaviour
for address in &info.listen_addrs {
self.discovery
.add_connected_address(&peer_id, address.clone());
}
self.events
.push(BehaviourEvent::Identified(peer_id, Box::new(info)));
}
IdentifyEvent::Error { .. } => {}
IdentifyEvent::SendBack { .. } => {}