only fetch blockhash for valid blocks
This commit is contained in:
parent
5f161cdbb0
commit
43923fe4e9
@ -11,7 +11,7 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
|||||||
if (is_array($dDifficulty) && array_key_exists('proof-of-work', $dDifficulty))
|
if (is_array($dDifficulty) && array_key_exists('proof-of-work', $dDifficulty))
|
||||||
$dDifficulty = $dDifficulty['proof-of-work'];
|
$dDifficulty = $dDifficulty['proof-of-work'];
|
||||||
$iBlock = $bitcoin->getblockcount();
|
$iBlock = $bitcoin->getblockcount();
|
||||||
$sBlockHash = $bitcoin->query('getblockhash', $iBlock);
|
is_int($iBlock) && $iBlock > 0 ? $sBlockHash = $bitcoin->query('getblockhash', $iBlock) : $sBlockHash = '';
|
||||||
} else {
|
} else {
|
||||||
$dDifficulty = 1;
|
$dDifficulty = 1;
|
||||||
$iBlock = 0;
|
$iBlock = 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user