removed debug output, added time to find next block
This commit is contained in:
parent
e316622327
commit
36cda9b629
@ -30,7 +30,6 @@ if (!$aHashData = $memcache->get('aHashData')) {
|
|||||||
WHERE time > DATE_SUB(now(), INTERVAL 10 MINUTE)
|
WHERE time > DATE_SUB(now(), INTERVAL 10 MINUTE)
|
||||||
GROUP BY account
|
GROUP BY account
|
||||||
ORDER BY hashrate DESC LIMIT 15");
|
ORDER BY hashrate DESC LIMIT 15");
|
||||||
echo $mysqli->error;
|
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
$hashrates= $stmt->get_result();
|
$hashrates= $stmt->get_result();
|
||||||
$aHashData = $hashrates->fetch_all(MYSQLI_ASSOC);
|
$aHashData = $hashrates->fetch_all(MYSQLI_ASSOC);
|
||||||
@ -38,7 +37,6 @@ echo $mysqli->error;
|
|||||||
$memcache->set('aHashData', $aHashData, 60);
|
$memcache->set('aHashData', $aHashData, 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (! $aContributerData = $memcache->get('aContributerData') ) {
|
if (! $aContributerData = $memcache->get('aContributerData') ) {
|
||||||
// Top 15 Contributers
|
// Top 15 Contributers
|
||||||
$stmt = $mysqli->prepare("SELECT count(id) AS shares, SUBSTRING_INDEX( `username` , '.', 1 ) AS account FROM shares GROUP BY account ORDER BY shares DESC LIMIT 15");
|
$stmt = $mysqli->prepare("SELECT count(id) AS shares, SUBSTRING_INDEX( `username` , '.', 1 ) AS account FROM shares GROUP BY account ORDER BY shares DESC LIMIT 15");
|
||||||
@ -64,7 +62,12 @@ $aBlocksFoundData = $blocksfound->fetch_all(MYSQLI_ASSOC);
|
|||||||
$stmt->close();
|
$stmt->close();
|
||||||
|
|
||||||
// Estimated time to find the next block
|
// Estimated time to find the next block
|
||||||
$iEstTime = (($dDifficulty * bcpow(2,$config['difficulty'])) / ( $settings->getValue('currenthashrate') * 1000));
|
if (!$iCurrentPoolHashrate = $memcache->get('iCurrentPoolHashrate')) {
|
||||||
|
$debug->append('Fetching iCurrentPoolHashrate from database');
|
||||||
|
$iCurrentPoolHashrate = $statistics->getCurrentHashrate();
|
||||||
|
$memcache->set('iCurrentPoolHashrate', $iCurrentPoolHashrate, 60);
|
||||||
|
}
|
||||||
|
$iEstTime = (($dDifficulty * bcpow(2,$config['difficulty'])) / $iCurrentPoolHashrate);
|
||||||
$now = new DateTime( "now" );
|
$now = new DateTime( "now" );
|
||||||
if (!empty($aBlockData)) {
|
if (!empty($aBlockData)) {
|
||||||
$dTimeSinceLast = ($now->getTimestamp() - $aBlockData['time']);
|
$dTimeSinceLast = ($now->getTimestamp() - $aBlockData['time']);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user