From 97ac16b21a43e8c1a183e8a8f9112c78daa893eb Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Sun, 28 Jul 2013 10:04:09 +0200 Subject: [PATCH] Fixing PPLNS target percentages This should fix #529 with proportional payouts towards the calculated PPLNS target are off. --- cronjobs/pplns_payout.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cronjobs/pplns_payout.php b/cronjobs/pplns_payout.php index 66d714d3..d6d00c9d 100755 --- a/cronjobs/pplns_payout.php +++ b/cronjobs/pplns_payout.php @@ -124,7 +124,7 @@ foreach ($aAllBlocks as $iIndex => $aBlock) { // Loop through all accounts that have found shares for this round foreach ($aAccountShares as $key => $aData) { // Payout based on PPLNS target shares, proportional payout for all users - $aData['percentage'] = number_format(round(( 100 / $pplns_target) * $aData['valid'], 8), 8); + $aData['percentage'] = number_format(round(( 100 / $iRoundShares) * $aData['valid'], 8), 8); $aData['payout'] = number_format(round(( $aData['percentage'] / 100 ) * $dReward, 8), 8); // Defaults $aData['fee' ] = 0;