From 2e79d8a78f6b9d18dea86579e16a4f0cb998c46c Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Sun, 12 May 2013 17:19:28 +0200 Subject: [PATCH] grab difficulty from block .. doh --- cronjobs/findblock.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cronjobs/findblock.php b/cronjobs/findblock.php index f4b75cc0..d693e6bf 100644 --- a/cronjobs/findblock.php +++ b/cronjobs/findblock.php @@ -30,7 +30,6 @@ if (!$strLastBlockHash) { // Fetch all transactions since our last block if ( $bitcoin->can_connect() === true ){ $aTransactions = $bitcoin->query('listsinceblock', $strLastBlockHash); - $iDifficulty = $bitcoin->query('getdifficulty'); } else { verbose("Aborted: " . $bitcoin->can_connect() . "\n"); exit(1); @@ -49,7 +48,7 @@ foreach ($aTransactions['transactions'] as $iIndex => $aData) { if ( $aData['category'] == 'generate' || $aData['category'] == 'immature' ) { $aBlockInfo = $bitcoin->query('getblock', $aData['blockhash']); $aData['height'] = $aBlockInfo['height']; - $aData['difficulty'] = $iDifficulty; + $aData['difficulty'] = $aBlockInfo['difficulty']; verbose(substr($aData['blockhash'], 0, 15) . "...\t" . $aData['height'] . "\t" . $aData['amount'] . "\t" .