Adding IPv6 support to peering (#1818)

This commit is contained in:
kph7
2018-06-28 00:29:27 -07:00
committed by Anton Kaliaev
parent 69356a60b5
commit e556e3336e
2 changed files with 33 additions and 4 deletions

View File

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