Fixing PPLNS target percentages

This should fix #529 with proportional payouts towards the calculated
PPLNS target are off.
This commit is contained in:
Sebastian Grewe 2013-07-28 10:04:09 +02:00
parent 6a0253114f
commit 97ac16b21a

View File

@ -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;