[FIX] Default to 0 if no prev upstream share available
This commit is contained in:
parent
fb2cae9430
commit
5cbb469b56
@ -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']);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user