Merge pull request #810 from TheSerapher/issue-715-skip-orphans
Issue 715 skip orphans
This commit is contained in:
commit
ab4e5df2bc
@ -53,7 +53,13 @@ foreach ($aAllBlocks as $iIndex => $aBlock) {
|
|||||||
$pplns_target = $config['pplns']['shares']['default'];
|
$pplns_target = $config['pplns']['shares']['default'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$aBlock['accounted'] && $aBlock['height'] > $setting->getValue('last_accounted_block_height')) {
|
if ($iLastBlockHeight = $setting->getValue('last_accounted_block_height')) {
|
||||||
|
$aLastAccountedBlock = $block->getBlock($iLastBlockHeight);
|
||||||
|
} else {
|
||||||
|
$iLastBlockHeight = 0;
|
||||||
|
}
|
||||||
|
// Double payout detection
|
||||||
|
if ( ( !$aBlock['accounted'] && $aBlock['height'] > $iLastBlockHeight ) || @$aLastAccountedBlock['confirmations'] == -1) {
|
||||||
$iPreviousShareId = @$aAllBlocks[$iIndex - 1]['share_id'] ? $aAllBlocks[$iIndex - 1]['share_id'] : 0;
|
$iPreviousShareId = @$aAllBlocks[$iIndex - 1]['share_id'] ? $aAllBlocks[$iIndex - 1]['share_id'] : 0;
|
||||||
$iCurrentUpstreamId = $aBlock['share_id'];
|
$iCurrentUpstreamId = $aBlock['share_id'];
|
||||||
if (!is_numeric($iCurrentUpstreamId)) {
|
if (!is_numeric($iCurrentUpstreamId)) {
|
||||||
|
|||||||
@ -45,7 +45,13 @@ $count = 0;
|
|||||||
// Table header for account shares
|
// Table header for account shares
|
||||||
$log->logInfo("ID\tUsername\tValid\tInvalid\tPercentage\tPayout\t\tDonation\tFee");
|
$log->logInfo("ID\tUsername\tValid\tInvalid\tPercentage\tPayout\t\tDonation\tFee");
|
||||||
foreach ($aAllBlocks as $iIndex => $aBlock) {
|
foreach ($aAllBlocks as $iIndex => $aBlock) {
|
||||||
if (!$aBlock['accounted'] && $aBlock['height'] > $setting->getValue('last_accounted_block_height')) {
|
if ($iLastBlockHeight = $setting->getValue('last_accounted_block_height')) {
|
||||||
|
$aLastAccountedBlock = $block->getBlock($iLastBlockHeight);
|
||||||
|
} else {
|
||||||
|
$iLastBlockHeight = 0;
|
||||||
|
}
|
||||||
|
// Double payout detection
|
||||||
|
if ( ( !$aBlock['accounted'] && $aBlock['height'] > $iLastBlockHeight ) || @$aLastAccountedBlock['confirmations'] == -1) {
|
||||||
$iPreviousShareId = @$aAllBlocks[$iIndex - 1]['share_id'] ? $aAllBlocks[$iIndex - 1]['share_id'] : 0;
|
$iPreviousShareId = @$aAllBlocks[$iIndex - 1]['share_id'] ? $aAllBlocks[$iIndex - 1]['share_id'] : 0;
|
||||||
$iCurrentUpstreamId = $aBlock['share_id'];
|
$iCurrentUpstreamId = $aBlock['share_id'];
|
||||||
$aAccountShares = $share->getSharesForAccounts($iPreviousShareId, $aBlock['share_id']);
|
$aAccountShares = $share->getSharesForAccounts($iPreviousShareId, $aBlock['share_id']);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user