Report external addresses in identify (#926)

This commit is contained in:
Pierre Krieger
2019-02-07 11:04:04 +01:00
committed by GitHub
parent 6b3b3ed2b5
commit 5cac5b5573
2 changed files with 5 additions and 2 deletions

View File

@ -2,7 +2,7 @@
name = "libp2p-identify"
edition = "2018"
description = "Nodes identifcation protocol for libp2p"
version = "0.3.0"
version = "0.3.1"
authors = ["Parity Technologies <admin@parity.io>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"

View File

@ -148,11 +148,14 @@ where
.map(|p| String::from_utf8_lossy(p).to_string())
.collect();
let mut listen_addrs: Vec<_> = params.listened_addresses().cloned().collect();
listen_addrs.extend(params.external_addresses());
let send_back_info = IdentifyInfo {
public_key: self.local_public_key.clone(),
protocol_version: self.protocol_version.clone(),
agent_version: self.agent_version.clone(),
listen_addrs: params.listened_addresses().cloned().collect(),
listen_addrs,
protocols,
};