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