mirror of https://github.com/BTCPrivate/z-nomp.git
Merge pull request #27 from fxminer/master
Stats fix, orphan blocks won't bug out payment processor and correct hashrate
This commit is contained in:
commit
fa9c48510e
|
@ -274,9 +274,10 @@ module.exports = function(logger, portalConfig, poolConfigs){
|
|||
var i = -1;
|
||||
var byteUnits = [ ' Sol',' KSol', ' MSol', ' GSol', ' TSol', ' PSol' ];
|
||||
do {
|
||||
hashrate = hashrate / 100000;
|
||||
i++;
|
||||
} while (hashrate > 1000);
|
||||
hashrate = hashrate / 1024;
|
||||
i++;
|
||||
} while (hashrate > 1024);
|
||||
|
||||
return hashrate.toFixed(2) + byteUnits[i];
|
||||
};
|
||||
|
||||
|
|
|
@ -53,9 +53,9 @@
|
|||
{{ for(var worker in it.stats.pools[pool].workers) { }}
|
||||
{{var workerstat = it.stats.pools[pool].workers[worker];}}
|
||||
<tr class="pure-table-odd">
|
||||
<td>{{=worker}}</td>
|
||||
<td>{{=Math.floor(workerstat.shares)}}</td>
|
||||
<td>{{=Math.floor(workerstat.invalidshares)}}</td>
|
||||
<td>{{=worker}}</td>
|
||||
<td>{{=Math.round(workerstat.shares * 100) / 100}}</td>
|
||||
<td>{{=Math.round(workerstat.invalidshares * 100) / 100}}</td>
|
||||
<td>{{? workerstat.shares > 0}} {{=Math.floor(10000 * workerstat.shares / (workerstat.shares + workerstat.invalidshares)) / 100}}% {{??}} 0% {{?}}</td>
|
||||
<td>{{=workerstat.hashrateString}}</td>
|
||||
</tr>
|
||||
|
|
|
@ -70,7 +70,7 @@ function buildChartData(){
|
|||
|
||||
function getReadableHashRateString(hashrate){
|
||||
var i = -1;
|
||||
var byteUnits = [ ' KH', ' MH', ' GH', ' TH', ' PH' ];
|
||||
var byteUnits = [ ' Sol', ' KSol', ' MSol', ' GSol', ' TSol' ];
|
||||
do {
|
||||
hashrate = hashrate / 1024;
|
||||
i++;
|
||||
|
@ -199,4 +199,4 @@ statsSource.addEventListener('message', function(e){
|
|||
}
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue