Browse Source

Merge pull request #216 from digital-dreamer/fix-281-update-cpu-count

Fix 2 issues with CPU count for mining
master
miguelfreitas 10 years ago
parent
commit
ac04ce45c5
  1. 7
      js/twister_network.js

7
js/twister_network.js

@ -10,6 +10,7 @@ var twisterDhtNodes = 0;
var twisterdBlocks = 0; var twisterdBlocks = 0;
var twisterdLastBlockTime = 0; var twisterdLastBlockTime = 0;
var twisterdConnectedAndUptodate = false; var twisterdConnectedAndUptodate = false;
var genproclimit = 1;
// --- // ---
@ -178,6 +179,7 @@ function getMiningInfo(cbFunc, cbArg) {
function(args, ret) { function(args, ret) {
miningDifficulty = ret.difficulty; miningDifficulty = ret.difficulty;
miningHashRate = ret.hashespersec; miningHashRate = ret.hashespersec;
genproclimit = ret.genproclimit;
$(".mining-difficulty").text(miningDifficulty); $(".mining-difficulty").text(miningDifficulty);
$(".mining-hashrate").text(miningHashRate); $(".mining-hashrate").text(miningHashRate);
@ -281,6 +283,7 @@ function interfaceNetworkHandlers() {
$( ".add-peer").bind( "click", addPeerClick ); $( ".add-peer").bind( "click", addPeerClick );
$( ".add-dns").bind( "click", addDNSClick ); $( ".add-dns").bind( "click", addDNSClick );
$( "select.genblock").change( setGenerate ); $( "select.genblock").change( setGenerate );
$( ".genproclimit").change( setGenerate );
$( ".update-spam-msg").bind( "click", setSpamMsg ); $( ".update-spam-msg").bind( "click", setSpamMsg );
$( ".terminate-daemon").bind( "click", exitDaemon ) $( ".terminate-daemon").bind( "click", exitDaemon )
} }
@ -306,7 +309,9 @@ function initInterfaceNetwork() {
networkUpdate(); networkUpdate();
setInterval("networkUpdate()", 2000); setInterval("networkUpdate()", 2000);
miningUpdate(); miningUpdate( function() {
$(".genproclimit").val(genproclimit);
});
setInterval("miningUpdate()", 2000); setInterval("miningUpdate()", 2000);
getGenerate(); getGenerate();

Loading…
Cancel
Save