fixing blockhash in round block details
This commit is contained in:
parent
6b40c0898a
commit
5257001153
@ -31,10 +31,10 @@ class RoundStats {
|
|||||||
**/
|
**/
|
||||||
public function getNextBlock($iHeight=0) {
|
public function getNextBlock($iHeight=0) {
|
||||||
$stmt = $this->mysqli->prepare("
|
$stmt = $this->mysqli->prepare("
|
||||||
SELECT height
|
SELECT height
|
||||||
FROM $this->tableBlocks
|
FROM $this->tableBlocks
|
||||||
WHERE height > ?
|
WHERE height > ?
|
||||||
ORDER BY height ASC
|
ORDER BY height ASC
|
||||||
LIMIT 1");
|
LIMIT 1");
|
||||||
if ($this->checkStmt($stmt) && $stmt->bind_param('i', $iHeight) && $stmt->execute() && $result = $stmt->get_result())
|
if ($this->checkStmt($stmt) && $stmt->bind_param('i', $iHeight) && $stmt->execute() && $result = $stmt->get_result())
|
||||||
return $result->fetch_object()->height;
|
return $result->fetch_object()->height;
|
||||||
@ -46,10 +46,10 @@ class RoundStats {
|
|||||||
**/
|
**/
|
||||||
public function getPreviousBlock($iHeight=0) {
|
public function getPreviousBlock($iHeight=0) {
|
||||||
$stmt = $this->mysqli->prepare("
|
$stmt = $this->mysqli->prepare("
|
||||||
SELECT height
|
SELECT height
|
||||||
FROM $this->tableBlocks
|
FROM $this->tableBlocks
|
||||||
WHERE height < ?
|
WHERE height < ?
|
||||||
ORDER BY height DESC
|
ORDER BY height DESC
|
||||||
LIMIT 1");
|
LIMIT 1");
|
||||||
if ($this->checkStmt($stmt) && $stmt->bind_param('i', $iHeight) && $stmt->execute() && $result = $stmt->get_result())
|
if ($this->checkStmt($stmt) && $stmt->bind_param('i', $iHeight) && $stmt->execute() && $result = $stmt->get_result())
|
||||||
return $result->fetch_object()->height;
|
return $result->fetch_object()->height;
|
||||||
@ -64,7 +64,7 @@ class RoundStats {
|
|||||||
public function getDetailsForBlockHeight($iHeight=0, $isAdmin=0) {
|
public function getDetailsForBlockHeight($iHeight=0, $isAdmin=0) {
|
||||||
$stmt = $this->mysqli->prepare("
|
$stmt = $this->mysqli->prepare("
|
||||||
SELECT
|
SELECT
|
||||||
b.id, height, amount, confirmations, difficulty, FROM_UNIXTIME(time) as time, shares,
|
b.id, height, blockhash, amount, confirmations, difficulty, FROM_UNIXTIME(time) as time, shares,
|
||||||
IF(a.is_anonymous, IF( ? , a.username, 'anonymous'), a.username) AS finder
|
IF(a.is_anonymous, IF( ? , a.username, 'anonymous'), a.username) AS finder
|
||||||
FROM $this->tableBlocks as b
|
FROM $this->tableBlocks as b
|
||||||
LEFT JOIN $this->tableUsers AS a ON b.account_id = a.id
|
LEFT JOIN $this->tableUsers AS a ON b.account_id = a.id
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user