[FIX] Calculations
This commit is contained in:
parent
d294e266a4
commit
4cb0e1c3df
@ -827,13 +827,10 @@ class Statistics extends Base {
|
||||
}
|
||||
$dDifficulty = $this->bitcoin->getdifficulty();
|
||||
} else {
|
||||
$dNetworkHashrate = 1;
|
||||
$hashrate = 1;
|
||||
$dDifficulty = 1;
|
||||
}
|
||||
if($hashrate <= 0){
|
||||
return $this->memcache->setCache(__FUNCTION__, $this->config['cointarget']);
|
||||
}
|
||||
|
||||
if ($hashrate <= 0) $hashrate = 1;
|
||||
return $this->memcache->setCache(__FUNCTION__, $this->coin->calcNetworkExpectedTimePerBlock($dDifficulty, $hashrate));
|
||||
}
|
||||
|
||||
|
||||
@ -117,8 +117,8 @@ $(document).ready(function(){
|
||||
$('#b-nextdiff').html('n/a');
|
||||
$('#b-nextdiffc').html(' No Estimates');
|
||||
}
|
||||
var minutes = Math.floor(data.getdashboarddata.data.network.esttimeperblock / 60);
|
||||
var seconds = Math.floor(data.getdashboarddata.data.network.esttimeperblock - minutes * 60);
|
||||
var minutes = Math.floor(data.getdashboarddata.data.pool.esttimeperblock / 60);
|
||||
var seconds = Math.floor(data.getdashboarddata.data.pool.esttimeperblock - minutes * 60);
|
||||
$('#b-esttimeperblock').html(minutes + " minutes " + seconds + " seconds"); // <- this needs some nicer format
|
||||
$('#b-nblock').html(data.getdashboarddata.data.network.block);
|
||||
$('#b-roundprogress').html(number_format(parseFloat(data.getdashboarddata.data.pool.shares.progress).toFixed(2), 2) + "%");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user