Merge pull request #471 from TheSerapher/issue-468

Fixing wrong round share calculations on PPLNS
This commit is contained in:
Sebastian Grewe 2013-07-17 00:04:32 -07:00
commit eaec69c8c6

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