nolim1t
5 years ago
No known key found for this signature in database
GPG Key ID: F6287B82CC84BCBD
2 changed files with
11 additions and
1 deletions
-
logic/bitcoind.js
-
services/bitcoind.js
|
|
@ -164,12 +164,17 @@ async function nodeStatusSummary() { |
|
|
|
const networkInfo = await bitcoindService.getNetworkInfo(); |
|
|
|
const mempoolInfo = await bitcoindService.getMempoolInfo(); |
|
|
|
|
|
|
|
// This line requires upstream changes
|
|
|
|
//const hashespersec = await bitcoindService.getHashesPerSec();
|
|
|
|
|
|
|
|
return { |
|
|
|
blocks: blockchainInfo.result.blocks, |
|
|
|
difficulty: blockchainInfo.result.difficulty, |
|
|
|
size: blockchainInfo.result.sizeOnDisk, |
|
|
|
mempool: mempoolInfo.result, |
|
|
|
connections: networkInfo.result.connections, |
|
|
|
connections: networkInfo.result.connections |
|
|
|
// Below requires upstream changes to bitcoind-rpc library
|
|
|
|
// hashespersec: hashespersec.result
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -96,6 +96,10 @@ function getNetworkInfo() { |
|
|
|
return promiseify(rpcClient, rpcClient.getNetworkInfo, 'network info'); |
|
|
|
} |
|
|
|
|
|
|
|
function getHashesPerSec() { |
|
|
|
return promiseify(rpcClient, rpcClient.getNetworkHashPs, 'network hash per second'); |
|
|
|
} |
|
|
|
|
|
|
|
function help() { |
|
|
|
// TODO: missing from the library, but can add it not sure how to package.
|
|
|
|
// rpc.uptime(function (err, res) {
|
|
|
@ -109,6 +113,7 @@ function help() { |
|
|
|
} |
|
|
|
|
|
|
|
module.exports = { |
|
|
|
getHashesPerSec, |
|
|
|
getBlockHash, |
|
|
|
getBlock, |
|
|
|
getTransaction, |
|
|
|