pool_ttf and bench fixes for more recent servers

This commit is contained in:
Tanguy Pruvot 2017-09-12 19:16:02 +02:00
parent f4caf07277
commit 9bfb531d03
2 changed files with 4 additions and 1 deletions

View file

@ -292,6 +292,8 @@ function BackendCoinsUpdate()
if(isset($pool_rate[$coin->algo])) if(isset($pool_rate[$coin->algo]))
$coin->pool_ttf = $coin->difficulty * 0x100000000 / $pool_rate[$coin->algo]; $coin->pool_ttf = $coin->difficulty * 0x100000000 / $pool_rate[$coin->algo];
if ($coin->pool_ttf > 9999999999) $coin->pool_ttf = 0;
if(strstr($coin->image, 'http')) if(strstr($coin->image, 'http'))
{ {
$data = file_get_contents($coin->image); $data = file_get_contents($coin->image);

View file

@ -23,7 +23,8 @@ $algoFilter = $algo != 'all' ? ' AND B.algo='.sqlQuote($algo) : '';
$chips = array(); $chips = array();
$in_db = dbolist("SELECT DISTINCT B.idchip as id, B.type, C.chip as name FROM benchmarks B". $in_db = dbolist("SELECT DISTINCT B.idchip as id, B.type, C.chip as name FROM benchmarks B".
" LEFT JOIN bench_chips C ON C.id=B.idchip WHERE B.idchip IS NOT NULL $algoFilter AND $sqlFilter GROUP BY B.idchip ORDER BY type DESC, name ASC"); " LEFT JOIN bench_chips C ON C.id=B.idchip WHERE B.idchip IS NOT NULL $algoFilter AND $sqlFilter".
" GROUP BY B.idchip, B.type ORDER BY B.type DESC, name ASC");
foreach ($in_db as $row) { foreach ($in_db as $row) {
$chips[$row['id']] = $row['name']; $chips[$row['id']] = $row['name'];
} }