Remove deprecated "getinfo" method.
This commit is contained in:
parent
57ce104c96
commit
c9ec10ee5c
@ -37,7 +37,7 @@ function DaemonInterface(daemons, logger){
|
||||
}
|
||||
|
||||
function isOnline(callback){
|
||||
cmd('getinfo', [], function(results){
|
||||
cmd('getnetworkinfo', [], function(results){
|
||||
var allOnline = results.every(function(result){
|
||||
return !results.error;
|
||||
});
|
||||
|
||||
14
lib/pool.js
14
lib/pool.js
@ -146,7 +146,7 @@ var pool = module.exports = function pool(options, authorizeFn){
|
||||
|
||||
var generateProgress = function(){
|
||||
|
||||
_this.daemon.cmd('getinfo', [], function(results) {
|
||||
_this.daemon.cmd('getblockchaininfo', [], function(results) {
|
||||
var blockCount = results.sort(function (a, b) {
|
||||
return b.response.blocks - a.response.blocks;
|
||||
})[0].response.blocks;
|
||||
@ -369,7 +369,8 @@ var pool = module.exports = function pool(options, authorizeFn){
|
||||
var batchRpcCalls = [
|
||||
['validateaddress', [options.address]],
|
||||
['getdifficulty', []],
|
||||
['getinfo', []],
|
||||
['getblockchaininfo', []],
|
||||
['getnetworkinfo', []],
|
||||
['getmininginfo', []],
|
||||
['submitblock', []]
|
||||
];
|
||||
@ -422,12 +423,13 @@ var pool = module.exports = function pool(options, authorizeFn){
|
||||
}
|
||||
})();
|
||||
|
||||
options.testnet = rpcResults.getinfo.testnet;
|
||||
options.protocolVersion = rpcResults.getinfo.protocolversion;
|
||||
options.testnet = (rpcResults.getblockchaininfo.chain === 'test') ? true : false;
|
||||
|
||||
options.protocolVersion = rpcResults.getnetworkinfo.protocolversion;
|
||||
|
||||
options.initStats = {
|
||||
connections: rpcResults.getinfo.connections,
|
||||
difficulty: rpcResults.getinfo.difficulty * algos[options.coin.algorithm].multiplier,
|
||||
connections: rpcResults.getnetworkinfo.connections,
|
||||
difficulty: rpcResults.getblockchaininfo.difficulty * algos[options.coin.algorithm].multiplier,
|
||||
networkHashRate: rpcResults.getmininginfo.networkhashps
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user