[FIX] Proper error on missing shares
This commit is contained in:
parent
6010f81155
commit
21acec83d0
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user