From fac2814618dd1b55825d765715ad04222e9ed03c Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Mon, 1 Jul 2013 17:05:41 +0200 Subject: [PATCH 1/2] Re-assign own estimate variable This might fix #314 that a user was since #306. --- .../mmcFE/statistics/pool/contributors_hashrate.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/templates/mmcFE/statistics/pool/contributors_hashrate.tpl b/public/templates/mmcFE/statistics/pool/contributors_hashrate.tpl index 2de97f37..041097ab 100644 --- a/public/templates/mmcFE/statistics/pool/contributors_hashrate.tpl +++ b/public/templates/mmcFE/statistics/pool/contributors_hashrate.tpl @@ -24,13 +24,13 @@ {/section} {if $listed != 1} - {if $GLOBAL.userdata.hashrate > 0}{math assign="estday" equation="round(reward / ( diff * pow(2,32) / ( hashrate * 1000 ) / 3600 / 24), 3)" diff=$DIFFICULTY reward=$REWARD hashrate=$GLOBAL.userdata.hashrate}{/if} + {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} n/a {$GLOBAL.userdata.username} {$GLOBAL.userdata.hashrate} - {$estday|number_format:"3"|default:"n/a"} - {if $GLOBAL.config.price.currency}{($estday * $GLOBAL.price)|default:"n/a"|number_format:"2"}{/if} + {$myestday|number_format:"3"|default:"n/a"} + {if $GLOBAL.config.price.currency}{($myestday * $GLOBAL.price)|default:"n/a"|number_format:"2"}{/if} {/if} From b89561df7869cc12a617d6309407e28777be779b Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Mon, 1 Jul 2013 17:53:57 +0200 Subject: [PATCH 2/2] Proper fix for top estimates being 0 Properly fixes #314 --- .../templates/mmcFE/statistics/pool/contributors_hashrate.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/templates/mmcFE/statistics/pool/contributors_hashrate.tpl b/public/templates/mmcFE/statistics/pool/contributors_hashrate.tpl index 041097ab..7b294265 100644 --- a/public/templates/mmcFE/statistics/pool/contributors_hashrate.tpl +++ b/public/templates/mmcFE/statistics/pool/contributors_hashrate.tpl @@ -14,7 +14,7 @@ {assign var=rank value=1} {assign var=listed value=0} {section contrib $CONTRIBHASHES} - {if $GLOBAL.userdata.hashrate > 0}{math assign="estday" equation="round(reward / ( diff * pow(2,32) / ( hashrate * 1000 ) / 3600 / 24), 3)" diff=$DIFFICULTY reward=$REWARD hashrate=$CONTRIBHASHES[contrib].hashrate}{/if} + {math assign="estday" equation="round(reward / ( diff * pow(2,32) / ( hashrate * 1000 ) / 3600 / 24), 3)" diff=$DIFFICULTY reward=$REWARD hashrate=$CONTRIBHASHES[contrib].hashrate} {$rank++} {$CONTRIBHASHES[contrib].account}