diff --git a/btcjson/dagsvrresults.go b/btcjson/dagsvrresults.go index 4fcb93d06..01122b747 100644 --- a/btcjson/dagsvrresults.go +++ b/btcjson/dagsvrresults.go @@ -231,7 +231,6 @@ type GetNetworkInfoResult struct { type GetPeerInfoResult struct { ID int32 `json:"id"` Addr string `json:"addr"` - AddrLocal string `json:"addrlocal,omitempty"` Services string `json:"services"` RelayTxes bool `json:"relaytxes"` LastSend int64 `json:"lastsend"` diff --git a/peer/peer.go b/peer/peer.go index e5eb0be3f..1eba244b8 100644 --- a/peer/peer.go +++ b/peer/peer.go @@ -713,17 +713,6 @@ func (p *Peer) LastRecv() time.Time { return time.Unix(atomic.LoadInt64(&p.lastRecv), 0) } -// LocalAddr returns the local address of the connection. -// -// This function is safe fo concurrent access. -func (p *Peer) LocalAddr() net.Addr { - var localAddr net.Addr - if atomic.LoadInt32(&p.connected) != 0 { - localAddr = p.conn.LocalAddr() - } - return localAddr -} - // BytesSent returns the total number of bytes sent by the peer. // // This function is safe for concurrent access. diff --git a/server/rpc/rpcserver.go b/server/rpc/rpcserver.go index 8907d9633..aa3b3295e 100644 --- a/server/rpc/rpcserver.go +++ b/server/rpc/rpcserver.go @@ -2362,7 +2362,6 @@ func handleGetPeerInfo(s *Server, cmd interface{}, closeChan <-chan struct{}) (i info := &btcjson.GetPeerInfoResult{ ID: statsSnap.ID, Addr: statsSnap.Addr, - AddrLocal: p.ToPeer().LocalAddr().String(), Services: fmt.Sprintf("%08d", uint64(statsSnap.Services)), RelayTxes: !p.IsTxRelayDisabled(), LastSend: statsSnap.LastSend.Unix(), diff --git a/server/rpc/rpcserverhelp.go b/server/rpc/rpcserverhelp.go index ecd1ae350..adccbc176 100644 --- a/server/rpc/rpcserverhelp.go +++ b/server/rpc/rpcserverhelp.go @@ -441,7 +441,6 @@ var helpDescsEnUS = map[string]string{ // GetPeerInfoResult help. "getpeerinforesult-id": "A unique node ID", "getpeerinforesult-addr": "The ip address and port of the peer", - "getpeerinforesult-addrlocal": "Local address", "getpeerinforesult-services": "Services bitmask which represents the services supported by the peer", "getpeerinforesult-relaytxes": "Peer has requested transactions be relayed to it", "getpeerinforesult-lastsend": "Time the last message was received in seconds since 1 Jan 1970 GMT",