We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 79c09bd + 94d67b3 commit cca0179Copy full SHA for cca0179
cronjobs/findblock.php
@@ -28,7 +28,13 @@
28
// Fetch our last block found from the DB as a starting point
29
$aLastBlock = @$block->getLastValid();
30
$strLastBlockHash = $aLastBlock['blockhash'];
31
-if (!$strLastBlockHash) $strLastBlockHash = '';
+if (!$strLastBlockHash) {
32
+ try {
33
+ $strLastBlockHash = $bitcoin->getblockhash(1);
34
+ } catch (Exception $e) {
35
+ $strLastBlockHash = "";
36
+ }
37
+}
38
39
// Fetch all transactions since our last block
40
if ( $bitcoin->can_connect() === true ){
0 commit comments