Fixing Sidebar estimations on PPLNS
This will address a new issue in #143, estimates where not displayed properly when pplns was active. Fixes #143
This commit is contained in:
parent
00b3c45d2a
commit
8808913ca5
@ -83,16 +83,7 @@ if (@$_SESSION['USERDATA']['id']) {
|
||||
$aGlobal['userdata']['sharerate'] = $statistics->getUserSharerate($_SESSION['USERDATA']['id']);
|
||||
|
||||
switch ($config['payout_system']) {
|
||||
case 'pplns':
|
||||
if ($iAvgBlockShares = round($block->getAvgBlockShares($config['pplns']['blockavg']['blockcount']))) {
|
||||
$aGlobal['pplns']['target'] = $iAvgBlockShares;
|
||||
} else {
|
||||
$aGlobal['pplns']['target'] = $config['pplns']['shares']['default'];
|
||||
}
|
||||
break;
|
||||
case 'pps':
|
||||
break;
|
||||
default:
|
||||
case 'prop' || 'pplns':
|
||||
// Some estimations
|
||||
if (@$aRoundShares['valid'] > 0) {
|
||||
$aGlobal['userdata']['est_block'] = round(( (int)$aGlobal['userdata']['shares']['valid'] / (int)$aRoundShares['valid'] ) * (float)$config['reward'], 8);
|
||||
@ -105,6 +96,14 @@ if (@$_SESSION['USERDATA']['id']) {
|
||||
$aGlobal['userdata']['est_donation'] = 0;
|
||||
$aGlobal['userdata']['est_payout'] = 0;
|
||||
}
|
||||
case 'pplns':
|
||||
if ($iAvgBlockShares = round($block->getAvgBlockShares($config['pplns']['blockavg']['blockcount']))) {
|
||||
$aGlobal['pplns']['target'] = $iAvgBlockShares;
|
||||
} else {
|
||||
$aGlobal['pplns']['target'] = $config['pplns']['shares']['default'];
|
||||
}
|
||||
break;
|
||||
case 'pps':
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user