From 5b0c39e84007dfd32176eab1694ec31729963b21 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 26 Feb 2014 18:37:12 -0700 Subject: [PATCH] Fix for broken block polling --- README.md | 3 +-- lib/pool.js | 4 +--- lib/stratum.js | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b9f4a74..b8d2f46 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ which are written in python. Compared to the spaghetti state of the latest lower barrier to entry for other developers to fork and add features or fix bugs. -Features (need additional testing) +Features ---------------------------------- * Daemon RPC interface * Stratum TCP socket server @@ -42,7 +42,6 @@ Features (need additional testing) #### Under development * P2P functionality for highly efficient block updates from daemon as a peer node -* Ability to use multiple daemons for block updates and submitting blocks * Clustering to take advantage of multiple CPU cores #### To do diff --git a/lib/pool.js b/lib/pool.js index 2d593cc..0a728d5 100644 --- a/lib/pool.js +++ b/lib/pool.js @@ -336,7 +336,7 @@ var pool = module.exports = function pool(options, authorizeFn){ function SetupBlockPolling(){ - if (typeof options.blockRefreshInterval === "number" && options.blockRefreshInterval > 0){ + if (typeof options.blockRefreshInterval !== "number" || options.blockRefreshInterval <= 0){ emitLog('system', 'Block template polling has been disabled'); return; } @@ -348,7 +348,6 @@ var pool = module.exports = function pool(options, authorizeFn){ if (error) { emitErrorLog('system', "Block polling error getting block template for " + options.name) } - }); }, pollingInterval); @@ -362,7 +361,6 @@ var pool = module.exports = function pool(options, authorizeFn){ if (error) { callback(error); } else { - var processedNewBlock = _this.jobManager.processTemplate(result, publicKeyBuffer); if (processedNewBlock && options.varDiff.enabled) diff --git a/lib/stratum.js b/lib/stratum.js index c9bdbfd..8048499 100644 --- a/lib/stratum.js +++ b/lib/stratum.js @@ -228,7 +228,6 @@ var StratumClient = function(options){ method: "mining.set_difficulty", params: [difficulty]//[512], }); - console.log('new diff sent ' + difficulty); return true;