[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) {
|
foreach ($aAllBlocks as $iIndex => $aBlock) {
|
||||||
if (empty($aBlock['share_id'])) {
|
if (empty($aBlock['share_id'])) {
|
||||||
// Fetch share information
|
// Fetch share information
|
||||||
$iPreviousShareId = $block->getLastShareId();
|
if ( !$iPreviousShareId = $block->getLastShareId())
|
||||||
if ( !$iPreviousShareId && $block->getBlockCount() > 1) {
|
|
||||||
$iPreviousShareId = 0;
|
$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
|
// Fetch this blocks upstream ID
|
||||||
$aBlockRPCInfo = $bitcoin->query('getblock', $aBlock['blockhash']);
|
$aBlockRPCInfo = $bitcoin->query('getblock', $aBlock['blockhash']);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user