add current height to /v1/node

This commit is contained in:
Manuel Araoz 2015-04-29 21:13:31 -03:00
parent 62948352d9
commit 749b8db70c
2 changed files with 2 additions and 0 deletions

View File

@ -21,6 +21,7 @@ describe('BitcoreHTTP v1 node routes', function() {
peerCount: 8,
version: 'test',
network: 'test',
height: 1234,
};
nodeMock.getStatus = function() {
return Promise.resolve(nodeMock.status);

View File

@ -188,6 +188,7 @@ BitcoreNode.prototype.getStatus = function() {
peerCount: this.networkMonitor.getConnectedPeers(),
version: pjson.version,
network: bitcore.Networks.defaultNetwork.name,
height: this.blockchain.getCurrentHeight(),
});
};