From 995ec08a5af26aeec3e38c43525c086031afbefd Mon Sep 17 00:00:00 2001 From: digital dreamer Date: Sun, 4 Jan 2015 10:08:19 +0100 Subject: [PATCH 1/2] Fix #281 - change of mining CPU count not working --- js/twister_network.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/twister_network.js b/js/twister_network.js index 9796fdb..a4f0909 100644 --- a/js/twister_network.js +++ b/js/twister_network.js @@ -281,6 +281,7 @@ function interfaceNetworkHandlers() { $( ".add-peer").bind( "click", addPeerClick ); $( ".add-dns").bind( "click", addDNSClick ); $( "select.genblock").change( setGenerate ); + $( ".genproclimit").change( setGenerate ); $( ".update-spam-msg").bind( "click", setSpamMsg ); $( ".terminate-daemon").bind( "click", exitDaemon ) } From 0d0cf0243178fe4c5578c97683707e3db64bb88e Mon Sep 17 00:00:00 2001 From: digital dreamer Date: Sun, 4 Jan 2015 11:31:22 +0100 Subject: [PATCH 2/2] Get current CPU count for mining on network page load --- js/twister_network.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/twister_network.js b/js/twister_network.js index a4f0909..ef8cabf 100644 --- a/js/twister_network.js +++ b/js/twister_network.js @@ -10,6 +10,7 @@ var twisterDhtNodes = 0; var twisterdBlocks = 0; var twisterdLastBlockTime = 0; var twisterdConnectedAndUptodate = false; +var genproclimit = 1; // --- @@ -178,6 +179,7 @@ function getMiningInfo(cbFunc, cbArg) { function(args, ret) { miningDifficulty = ret.difficulty; miningHashRate = ret.hashespersec; + genproclimit = ret.genproclimit; $(".mining-difficulty").text(miningDifficulty); $(".mining-hashrate").text(miningHashRate); @@ -307,7 +309,9 @@ function initInterfaceNetwork() { networkUpdate(); setInterval("networkUpdate()", 2000); - miningUpdate(); + miningUpdate( function() { + $(".genproclimit").val(genproclimit); + }); setInterval("miningUpdate()", 2000); getGenerate();