From 314dacf98a7b11861a958ecc250b03bc0e52aadb Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 26 Mar 2014 20:53:30 -0600 Subject: [PATCH] Fixed global hashrate problem --- config.json | 2 +- libs/stats.js | 4 ++-- libs/website.js | 3 ++- pool_configs/galleon_example.json | 22 ++++++++++++++++++++++ 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/config.json b/config.json index ec88df7..f602d64 100644 --- a/config.json +++ b/config.json @@ -20,7 +20,7 @@ "enabled": true, "siteTitle": "Cryppit", "port": 80, - "statUpdateInterval": 3, + "statUpdateInterval": 5, "hashrateWindow": 600 }, "proxy": { diff --git a/libs/stats.js b/libs/stats.js index c049c76..87277b4 100644 --- a/libs/stats.js +++ b/libs/stats.js @@ -139,10 +139,10 @@ module.exports = function(logger, portalConfig, poolConfigs){ var shareMultiplier = algoMultipliers[coinStats.algorithm]; var hashratePre = shareMultiplier * coinStats.shares / portalConfig.website.hashrateWindow; coinStats.hashrate = hashratePre / 1e3 | 0; - delete coinStats.hashrates; - delete coinStats.shares; portalStats.global.hashrate += coinStats.hashrate; portalStats.global.workers += Object.keys(coinStats.workers).length; + delete coinStats.hashrates; + delete coinStats.shares; }); _this.stats = portalStats; diff --git a/libs/website.js b/libs/website.js index 6f39f53..d4ea491 100644 --- a/libs/website.js +++ b/libs/website.js @@ -55,7 +55,8 @@ module.exports = function(logger){ portalConfig: portalConfig }); } - logger.debug(logSystem, 'Stats', 'Website updated to latest stats'); + + //logger.debug(logSystem, 'Stats', 'Website updated to latest stats'); }; diff --git a/pool_configs/galleon_example.json b/pool_configs/galleon_example.json index 08c1c6e..470361a 100644 --- a/pool_configs/galleon_example.json +++ b/pool_configs/galleon_example.json @@ -7,6 +7,28 @@ "txRefreshInterval": 20000, "connectionTimeout": 600, + "shareProcessing": { + "internal": { + "enabled": true, + "validateWorkerAddress": true, + "paymentInterval": 10, + "minimumPayment": 100.001, + "minimumReserve": 10, + "feePercent": 0.02, + "feeReceiveAddress": "GRAiuGCWLrL8Psdr6pkhLpxrQGHdYfrSEz", + "feeWithdrawalThreshold": 5, + "daemon": { + "host": "localhost", + "port": 19632, + "user": "testuser", + "password": "testpass" + }, + "redis": { + "host": "localhost", + "port": 6379 + } + } + }, "ports": { "3537": {