http: refactor info.
This commit is contained in:
parent
d661496541
commit
67ffecc989
@ -636,20 +636,28 @@ HTTPServer.prototype._init = function _init() {
|
|||||||
send(200, {
|
send(200, {
|
||||||
version: constants.USER_VERSION,
|
version: constants.USER_VERSION,
|
||||||
agent: constants.USER_AGENT,
|
agent: constants.USER_AGENT,
|
||||||
services: this.pool.services.toString(2),
|
|
||||||
network: this.network.type,
|
network: this.network.type,
|
||||||
height: this.chain.height,
|
chain: {
|
||||||
tip: this.chain.tip.rhash(),
|
height: this.chain.height,
|
||||||
outbound: this.pool.peers.outbound.length + loader,
|
tip: this.chain.tip.rhash(),
|
||||||
pending: this.pool.peers.pending.length,
|
progress: this.chain.getProgress()
|
||||||
inbound: this.pool.peers.inbound.length,
|
},
|
||||||
progress: this.chain.getProgress(),
|
pool: {
|
||||||
mempoolTX: totalTX,
|
services: this.pool.services.toString(2),
|
||||||
mempoolSize: size,
|
outbound: this.pool.peers.outbound.length + loader,
|
||||||
uptime: Math.floor(util.uptime()),
|
pending: this.pool.peers.pending.length,
|
||||||
systemTime: util.now(),
|
inbound: this.pool.peers.inbound.length
|
||||||
adjustedTime: this.network.now(),
|
},
|
||||||
timeOffset: this.network.time.offset,
|
mempool: {
|
||||||
|
tx: totalTX,
|
||||||
|
size: size
|
||||||
|
},
|
||||||
|
time: {
|
||||||
|
uptime: Math.floor(util.uptime()),
|
||||||
|
system: util.now(),
|
||||||
|
adjusted: this.network.now(),
|
||||||
|
offset: this.network.time.offset
|
||||||
|
},
|
||||||
memory: getMemory()
|
memory: getMemory()
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user