Update pplns_payout.php
This commit is contained in:
parent
21888a8153
commit
9a23148adb
@ -85,7 +85,7 @@ foreach ($aAllBlocks as $iIndex => $aBlock) {
|
||||
// We need to go one ID lower due to `id >` or we won't match if minimum share ID == $aBlock['share_id']
|
||||
$aAccountShares = $share->getSharesForAccounts($iMinimumShareId - 1, $aBlock['share_id']);
|
||||
if (empty($aAccountShares)) {
|
||||
$log->logFatal("No shares found for this block, aborted! Block Height : " . $aBlock['height'] ', Block ID:' . $aBlock['id']);
|
||||
$log->logFatal("No shares found for this block, aborted! Block Height : " . $aBlock['height'] . ', Block ID: ' . $aBlock['id']);
|
||||
$monitoring->endCronjob($cron_name, 'E0013', 1, true);
|
||||
}
|
||||
foreach($aAccountShares as $key => $aData) {
|
||||
@ -211,15 +211,15 @@ foreach ($aAllBlocks as $iIndex => $aBlock) {
|
||||
|
||||
// Add new credit transaction
|
||||
if (!$transaction->addTransaction($aData['id'], $aData['payout'], 'Credit', $aBlock['id']))
|
||||
$log->logFatal('Failed to insert new Credit transaction to database for ' . $aData['username'] . ': ' . $transaction->getCronError() . 'on block' . $aBlock['id']);
|
||||
$log->logFatal('Failed to insert new Credit transaction to database for ' . $aData['username'] . ': ' . $transaction->getCronError() . 'on block ' . $aBlock['id']);
|
||||
// Add new fee debit for this block
|
||||
if ($aData['fee'] > 0 && $config['fees'] > 0)
|
||||
if (!$transaction->addTransaction($aData['id'], $aData['fee'], 'Fee', $aBlock['id']))
|
||||
$log->logFatal('Failed to insert new Fee transaction to database for ' . $aData['username'] . ': ' . $transaction->getCronError() . 'on block' . $aBlock['id']);
|
||||
$log->logFatal('Failed to insert new Fee transaction to database for ' . $aData['username'] . ': ' . $transaction->getCronError() . 'on block ' . $aBlock['id']);
|
||||
// Add new donation debit
|
||||
if ($aData['donation'] > 0)
|
||||
if (!$transaction->addTransaction($aData['id'], $aData['donation'], 'Donation', $aBlock['id']))
|
||||
$log->logFatal('Failed to insert new Donation transaction to database for ' . $aData['username'] . ': ' . $transaction->getCronError() . 'on block' . $aBlock['id']);
|
||||
$log->logFatal('Failed to insert new Donation transaction to database for ' . $aData['username'] . ': ' . $transaction->getCronError() . 'on block ' . $aBlock['id']);
|
||||
}
|
||||
|
||||
// Add full round share statistics
|
||||
@ -228,7 +228,7 @@ foreach ($aAllBlocks as $iIndex => $aBlock) {
|
||||
continue;
|
||||
}
|
||||
if (!$statistics->insertPPLNSStatistics($aRoundData, $aBlock['id']))
|
||||
$log->logError('Failed to insert share statistics for ' . $aRoundData['username'] . ': ' . $statistics->getCronError() . 'on block' . $aBlock['id']);
|
||||
$log->logError('Failed to insert share statistics for ' . $aRoundData['username'] . ': ' . $statistics->getCronError() . 'on block ' . $aBlock['id']);
|
||||
}
|
||||
|
||||
// Store this blocks height as last accounted for
|
||||
|
||||
Loading…
Reference in New Issue
Block a user