[FIX] Fix payouts on orphans

This commit is contained in:
Sebastian Grewe 2013-10-30 14:45:40 +01:00
parent c9435cf180
commit b98258bf62
2 changed files with 3 additions and 2 deletions

View File

@ -59,7 +59,7 @@ foreach ($aAllBlocks as $iIndex => $aBlock) {
$iLastBlockHeight = 0;
}
// Double payout detection
if (!$aBlock['accounted'] && $aBlock['height'] > $iLastBlockHeight && @$aLastAccountedBlock['confirmations'] != -1) {
if ( ( !$aBlock['accounted'] && $aBlock['height'] > $iLastBlockHeight ) || @$aLastAccountedBlock['confirmations'] == -1) {
$iPreviousShareId = @$aAllBlocks[$iIndex - 1]['share_id'] ? $aAllBlocks[$iIndex - 1]['share_id'] : 0;
$iCurrentUpstreamId = $aBlock['share_id'];
if (!is_numeric($iCurrentUpstreamId)) {

View File

@ -50,7 +50,8 @@ foreach ($aAllBlocks as $iIndex => $aBlock) {
} else {
$iLastBlockHeight = 0;
}
if (!$aBlock['accounted'] && $aBlock['height'] > $iLastBlockHeight && @$aLastAccountedBlock['confirmations'] != -1) {
// Double payout detection
if ( ( !$aBlock['accounted'] && $aBlock['height'] > $iLastBlockHeight ) || @$aLastAccountedBlock['confirmations'] == -1) {
$iPreviousShareId = @$aAllBlocks[$iIndex - 1]['share_id'] ? $aAllBlocks[$iIndex - 1]['share_id'] : 0;
$iCurrentUpstreamId = $aBlock['share_id'];
$aAccountShares = $share->getSharesForAccounts($iPreviousShareId, $aBlock['share_id']);