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