commit
cca0179d83
@ -28,7 +28,13 @@ require_once('shared.inc.php');
|
|||||||
// Fetch our last block found from the DB as a starting point
|
// Fetch our last block found from the DB as a starting point
|
||||||
$aLastBlock = @$block->getLastValid();
|
$aLastBlock = @$block->getLastValid();
|
||||||
$strLastBlockHash = $aLastBlock['blockhash'];
|
$strLastBlockHash = $aLastBlock['blockhash'];
|
||||||
if (!$strLastBlockHash) $strLastBlockHash = '';
|
if (!$strLastBlockHash) {
|
||||||
|
try {
|
||||||
|
$strLastBlockHash = $bitcoin->getblockhash(1);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$strLastBlockHash = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Fetch all transactions since our last block
|
// Fetch all transactions since our last block
|
||||||
if ( $bitcoin->can_connect() === true ){
|
if ( $bitcoin->can_connect() === true ){
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user