From 5cbb469b5624a0bd858777955da65528e00ab558 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Wed, 30 Oct 2013 14:11:08 +0100 Subject: [PATCH] [FIX] Default to 0 if no prev upstream share available --- cronjobs/findblock.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cronjobs/findblock.php b/cronjobs/findblock.php index 50d03a61..036b5aa1 100755 --- a/cronjobs/findblock.php +++ b/cronjobs/findblock.php @@ -82,11 +82,8 @@ if (empty($aAllBlocks)) { foreach ($aAllBlocks as $iIndex => $aBlock) { if (empty($aBlock['share_id'])) { // Fetch share information - $iPreviousShareId = $block->getLastShareId(); - if ( !$iPreviousShareId && $block->getBlockCount() > 1) { + if ( !$iPreviousShareId = $block->getLastShareId()) $iPreviousShareId = 0; - // $log->logError('Unable to find highest share ID found so far, assuming share ID 0 as previous found upstream share.'); - } // Fetch this blocks upstream ID $aBlockRPCInfo = $bitcoin->query('getblock', $aBlock['blockhash']);