diff --git a/cronjobs/findblock.php b/cronjobs/findblock.php index 8e12a5d9..782ed92a 100755 --- a/cronjobs/findblock.php +++ b/cronjobs/findblock.php @@ -86,6 +86,11 @@ if (empty($aAllBlocks)) { $aBlockRPCInfo = $bitcoin->query('getblock', $aBlock['blockhash']); if ($share->findUpstreamShare($aBlockRPCInfo, $iPreviousShareId)) { $iCurrentUpstreamId = $share->getUpstreamShareId(); + // Rarely happens, but did happen once to me + if ($iCurrentUpstreamId == $iPreviousShareId) { + $log->logFatal($share->getErrorMsg('E0063')); + $monitoring->endCronjob($cron_name, 'E0063', 1, true); + } // Out of order share detection if ($iCurrentUpstreamId < $iPreviousShareId) { // Fetch our offending block diff --git a/public/include/classes/share.class.php b/public/include/classes/share.class.php index cc634269..bbf378cf 100644 --- a/public/include/classes/share.class.php +++ b/public/include/classes/share.class.php @@ -315,7 +315,8 @@ class Share Extends Base { if (!empty($this->oUpstream->account) && is_int($this->oUpstream->id)) return true; } - return $this->getErrorMsg('E0052', $aBlock['height']); + $this->setErrorMessage($this->getErrorMsg('E0052', $aBlock['height'])); + return false; } /**