NetAddress returns a NetAddress derived from the DefaultNodeInfo - it includes the authenticated peer ID and the self-reported ListenAddr. Note that the ListenAddr is not authenticated and may not match that address actually dialed if its an outbound peer.
()
| 219 | // ListenAddr. Note that the ListenAddr is not authenticated and |
| 220 | // may not match that address actually dialed if its an outbound peer. |
| 221 | func (info DefaultNodeInfo) NetAddress() (*NetAddress, error) { |
| 222 | idAddr := IDAddressString(info.ID(), info.ListenAddr) |
| 223 | return NewNetAddressString(idAddr) |
| 224 | } |
| 225 | |
| 226 | func (info DefaultNodeInfo) HasChannel(chID byte) bool { |
| 227 | return bytes.Contains(info.Channels, []byte{chID}) |
nothing calls this directly
no test coverage detected