diff --git a/apolloui b/apolloui index f2ec08f..9a6bbff 160000 --- a/apolloui +++ b/apolloui @@ -1 +1 @@ -Subproject commit f2ec08faad3fd084061ecadf8c84f24c42f8737c +Subproject commit 9a6bbff237eef8b3f8535531278350684338fe38 diff --git a/backend/os_stats_fake b/backend/os_stats_fake index 39d9cea..9f32190 100755 --- a/backend/os_stats_fake +++ b/backend/os_stats_fake @@ -23,11 +23,11 @@ cat << EOF }], "memory": { - "total": 245760, - "available": 109952, - "used": 233220, - "cache": 97412, - "swap": 1280 + "total": 2457600, + "available": 1099520, + "used": 2332200, + "cache": 974120, + "swap": 12800 }, "cpu": { diff --git a/btc-miner-test-server.js b/btc-miner-test-server.js index 34aad4f..a99bb20 100644 --- a/btc-miner-test-server.js +++ b/btc-miner-test-server.js @@ -1,9 +1,10 @@ const fs = require('fs'); +const moment = require('moment'); function getData() { const hashrate = getRandomFloat(3700, 4000).toFixed(1); return { - "date": "2021-01-26 15:54:19", + "date": moment().format('YYYY-MM-DD HH:mm:ss'), //"2021-01-26 15:54:19" "statVersion": "1.2", "versions": { "miner": "v13.16.1", diff --git a/migrations/20180629144344_initial.js b/migrations/20180629144344_initial.js index 8cdf2c1..dc3f8dd 100644 --- a/migrations/20180629144344_initial.js +++ b/migrations/20180629144344_initial.js @@ -50,7 +50,7 @@ exports.up = async function (knex) { await knex('pools').insert({ enabled: true, donation: 1, - url: 'stratum+tcp://us.litecoinpool.org:3333', + url: 'stratum+tcp://stratum.slushpool.com:3333', username: 'jstefanop.a1', password: 'a1', index: 99 diff --git a/src/store/api/node/nodeStats.js b/src/store/api/node/nodeStats.js index 7b47e5a..8d772ef 100644 --- a/src/store/api/node/nodeStats.js +++ b/src/store/api/node/nodeStats.js @@ -1,7 +1,7 @@ const { join } = require('path') const { exec } = require('child_process') -const litecoin = require('litecoin'); +const bitcoin = require('litecoin'); module.exports = ({ define }) => { define('stats', async (payload, { knex, errors, utils }) => { @@ -63,7 +63,7 @@ module.exports = ({ define }) => { }) } -const litecoinClient = new litecoin.Client({ +const bitcoinClient = new bitcoin.Client({ host: '127.0.0.1', port: 8332, user: 'futurebit', @@ -74,14 +74,14 @@ const litecoinClient = new litecoin.Client({ function getNodeStats () { const getBlockchainInfoPromise = new Promise((resolve, reject) => { - litecoinClient.getBlockchainInfo((error, blockchainInfo) => { + bitcoinClient.getBlockchainInfo((error, blockchainInfo) => { if (error) { reject(error) } else { try { // Use bestblockhash to call bestBlock, to retrieve time of last block calculation const bestBlockHash = blockchainInfo.bestblockhash - litecoinClient.getBlock(bestBlockHash, (error, block) => { + bitcoinClient.getBlock(bestBlockHash, (error, block) => { if (error) { reject(error) } else { @@ -98,7 +98,7 @@ function getNodeStats () { }) const getConnectionCountPromise = new Promise((resolve, reject) => { - litecoinClient.getConnectionCount((error, connectionCount) => { + bitcoinClient.getConnectionCount((error, connectionCount) => { if (error) { reject(error) } else { @@ -112,7 +112,7 @@ function getNodeStats () { }) const getMiningInfoPromise = new Promise((resolve, reject) => { - litecoinClient.getMiningInfo((error, miningInfo) => { + bitcoinClient.getMiningInfo((error, miningInfo) => { if (error) { reject(error) } else { @@ -126,7 +126,7 @@ function getNodeStats () { }) const getPeerInfoPromise = new Promise((resolve, reject) => { - litecoinClient.getPeerInfo((error, peerInfo) => { + bitcoinClient.getPeerInfo((error, peerInfo) => { if (error) { reject(error) } else {