[p2p] add godoc comments to Listener (#1828)

* update changelog

* document p2p/listener

* do not expose underlying net.Listener

* add a TODO

* replace todo with a comment
This commit is contained in:
Anton Kaliaev
2018-06-29 11:48:52 +04:00
committed by GitHub
parent 58acbf5ee3
commit ada5ef0669
3 changed files with 25 additions and 12 deletions

View File

@ -696,7 +696,7 @@ func (n *Node) makeNodeInfo(nodeID p2p.ID) p2p.NodeInfo {
}
p2pListener := n.sw.Listeners()[0]
p2pHost := p2pListener.ExternalAddressToString()
p2pHost := p2pListener.ExternalAddressHost()
p2pPort := p2pListener.ExternalAddress().Port
nodeInfo.ListenAddr = cmn.Fmt("%v:%v", p2pHost, p2pPort)