[FIX] Proper error on missing shares

This commit is contained in:
Sebastian Grewe 2013-11-17 16:36:30 +01:00
parent 6010f81155
commit 21acec83d0
2 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -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;
}
/**