Abort payout process if missing share_id

As discussed in #392 we should abort any payouts for rounds until the
issue is fixed.
This commit is contained in:
Sebastian Grewe 2013-07-07 00:24:21 +02:00
parent 2f2acdad6d
commit 394d8b52a9

View File

@ -47,6 +47,7 @@ foreach ($aAllBlocks as $iIndex => $aBlock) {
if (!$aBlock['accounted']) {
$iPreviousShareId = @$aAllBlocks[$iIndex - 1]['share_id'] ? $aAllBlocks[$iIndex - 1]['share_id'] : 0;
$iCurrentUpstreamId = $aBlock['share_id'];
if (!is_number($iCurrentUpstreamId)) die("Block " . $aBlock['height'] . " has no share_id associated with it, not going to continue\n");
$iRoundShares = $share->getRoundShares($iPreviousShareId, $aBlock['share_id']);
$config['reward_type'] == 'block' ? $dReward = $aBlock['amount'] : $dReward = $config['reward'];
$aRoundAccountShares = $share->getSharesForAccounts($iPreviousShareId, $aBlock['share_id']);