Fixing wrong round share calculations on PPLNS

This addresses #468, might be the actual fix already.
This commit is contained in:
Sebastian Grewe 2013-07-16 21:49:12 +02:00
parent b7ffbd0bfd
commit 60b4bba489

View File

@ -65,7 +65,7 @@ foreach ($aAllBlocks as $iIndex => $aBlock) {
if ($iRoundShares >= $pplns_target) {
$log->logDebug("Matching or exceeding PPLNS target of $pplns_target with $iRoundShares");
$aAccountShares = $share->getSharesForAccounts($aBlock['share_id'] - $pplns_target + 1, $aBlock['share_id']);
$aAccountShares = $share->getSharesForAccounts($aBlock['share_id'] - $pplns_target, $aBlock['share_id']);
if (empty($aAccountShares)) {
$log->logFatal("No shares found for this block, aborted! Block Height : " . $aBlock['height']);
$monitoring->setStatus($cron_name . "_active", "yesno", 0);