Get current CPU count for mining on network page load

This commit is contained in:
digital dreamer 2015-01-04 11:31:22 +01:00
parent 995ec08a5a
commit 0d0cf02431

View File

@ -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);
@ -307,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();