diff --git a/lib/http/rpc.js b/lib/http/rpc.js index a96da85f..e5920ed4 100644 --- a/lib/http/rpc.js +++ b/lib/http/rpc.js @@ -463,11 +463,11 @@ RPC.prototype.getaddednodeinfo = co(function* getaddednodeinfo(args) { RPC.prototype._toAddedNode = function _toAddedNode(peer) { return { - addednode: peer.hostname, + addednode: peer.hostname(), connected: peer.connected, addresses: [ { - address: peer.hostname, + address: peer.hostname(), connected: peer.outbound ? 'outbound' : 'inbound' @@ -512,15 +512,15 @@ RPC.prototype.getpeerinfo = co(function* getpeerinfo(args) { throw new RPCError('getpeerinfo'); for (peer = this.pool.peers.head(); peer; peer = peer.next) { - offset = this.network.time.known[peer.hostname]; + offset = this.network.time.known[peer.hostname()]; if (offset == null) offset = 0; peers.push({ id: id++, - addr: peer.hostname, - addrlocal: peer.hostname, + addr: peer.hostname(), + addrlocal: peer.hostname(), relaytxes: peer.outbound, lastsend: peer.lastSend / 1000 | 0, lastrecv: peer.lastRecv / 1000 | 0,