bitcoind: return selected set of info for getinfo

This commit is contained in:
Braydon Fuller 2016-04-25 11:12:03 -04:00
parent 3f34fb6ea0
commit 944c44ed74
1 changed files with 14 additions and 2 deletions

View File

@ -1631,8 +1631,20 @@ Bitcoin.prototype.getInfo = function(callback) {
return callback(self._wrapRPCError(err));
}
var result = response.result;
result.network = self.node.getNetworkName();
callback(null, result);
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: self.node.getNetworkName()
};
callback(null, info);
});
};