From 6063a3498bbccc005304efa02fb6f0b1407e0c7b Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Wed, 27 Nov 2013 13:43:59 +0100 Subject: [PATCH] [FIX] Proper estimates on changed personal modifier --- public/include/smarty_globals.inc.php | 3 ++- .../mpos/statistics/pool/contributors_hashrate.tpl | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/public/include/smarty_globals.inc.php b/public/include/smarty_globals.inc.php index 806349dd..9baa3946 100644 --- a/public/include/smarty_globals.inc.php +++ b/public/include/smarty_globals.inc.php @@ -114,7 +114,8 @@ if (@$_SESSION['USERDATA']['id']) { // Other userdata that we can cache savely $aGlobal['userdata']['shares'] = $statistics->getUserShares($_SESSION['USERDATA']['id']); - $aGlobal['userdata']['hashrate'] = $statistics->getUserHashrate($_SESSION['USERDATA']['id']) * $dPersonalHashrateModifier; + $aGlobal['userdata']['rawhashrate'] = $statistics->getUserHashrate($_SESSION['USERDATA']['id']); + $aGlobal['userdata']['hashrate'] = $aGlobal['userdata']['rawhashrate'] * $dPersonalHashrateModifier; $aGlobal['userdata']['sharerate'] = $statistics->getUserSharerate($_SESSION['USERDATA']['id']); switch ($config['payout_system']) { diff --git a/public/templates/mpos/statistics/pool/contributors_hashrate.tpl b/public/templates/mpos/statistics/pool/contributors_hashrate.tpl index f54a36e3..7502730d 100644 --- a/public/templates/mpos/statistics/pool/contributors_hashrate.tpl +++ b/public/templates/mpos/statistics/pool/contributors_hashrate.tpl @@ -26,13 +26,13 @@ {if $GLOBAL.config.price.currency}{($estday * $GLOBAL.price)|default:"n/a"|number_format:"4"}{/if} {/section} -{if $listed != 1 && $GLOBAL.userdata.username|default:"" && $GLOBAL.userdata.hashrate|default:"0" > 0} - {if $GLOBAL.userdata.hashrate > 0}{math assign="myestday" equation="round(reward / ( diff * pow(2,32) / ( hashrate * 1000 ) / 3600 / 24), 3)" diff=$DIFFICULTY reward=$REWARD hashrate=$GLOBAL.userdata.hashrate}{/if} +{if $listed != 1 && $GLOBAL.userdata.username|default:"" && $GLOBAL.userdata.rawhashrate|default:"0" > 0} + {math assign="myestday" equation="round(reward / ( diff * pow(2,32) / ( hashrate * 1000 ) / 3600 / 24), 3)" diff=$DIFFICULTY reward=$REWARD hashrate=$GLOBAL.userdata.rawhashrate} n/a {if $GLOBAL.userdata.donate_percent > 0}{/if} {$GLOBAL.userdata.username|escape} - {$GLOBAL.userdata.hashrate} + {$GLOBAL.userdata.rawhashrate|number_format} {$myestday|number_format:"3"|default:"n/a"} {if $GLOBAL.config.price.currency}{($myestday * $GLOBAL.price)|default:"n/a"|number_format:"4"}{/if}