status: camelCase adjustments for bitcore node
This commit is contained in:
parent
c6bd150bd9
commit
285e3550f5
@ -45,7 +45,25 @@ StatusController.prototype.show = function(req, res) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
StatusController.prototype.getInfo = function(callback) {
|
StatusController.prototype.getInfo = function(callback) {
|
||||||
this.node.services.bitcoind.getInfo(callback);
|
this.node.services.bitcoind.getInfo(function(err, result) {
|
||||||
|
if (err) {
|
||||||
|
return callback(err);
|
||||||
|
}
|
||||||
|
var info = {
|
||||||
|
version: result.version,
|
||||||
|
protocolversion: result.protocolVersion,
|
||||||
|
blocks: result.blocks,
|
||||||
|
timeoffset: result.timeOffset,
|
||||||
|
connections: result.connections,
|
||||||
|
proxy: result.proxy,
|
||||||
|
difficulty: result.difficulty,
|
||||||
|
testnet: result.testnet,
|
||||||
|
relayfee: result.relayFee,
|
||||||
|
errors: result.errors,
|
||||||
|
network: result.network
|
||||||
|
};
|
||||||
|
callback(null, info);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
StatusController.prototype.getLastBlockHash = function() {
|
StatusController.prototype.getLastBlockHash = function() {
|
||||||
|
|||||||
@ -8,13 +8,13 @@ describe('Status', function() {
|
|||||||
describe('/status', function() {
|
describe('/status', function() {
|
||||||
var info = {
|
var info = {
|
||||||
version: 110000,
|
version: 110000,
|
||||||
protocolversion: 70002,
|
protocolVersion: 70002,
|
||||||
blocks: 548645,
|
blocks: 548645,
|
||||||
timeoffset: 0,
|
timeOffset: 0,
|
||||||
connections: 8,
|
connections: 8,
|
||||||
difficulty: 21546.906405522557,
|
difficulty: 21546.906405522557,
|
||||||
testnet: true,
|
testnet: true,
|
||||||
relayfee: 1000,
|
relayFee: 1000,
|
||||||
errors: ''
|
errors: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user