From eacb8dff03b2fb6da935990a295ccbf3dbc5634d Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Thu, 22 Aug 2013 11:30:27 +0200 Subject: [PATCH] updated templates --- public/templates/mmcFE/statistics/blocks/default.tpl | 11 +++++------ .../templates/mmcFE/statistics/pool/authenticated.tpl | 3 ++- .../mobile/statistics/pool/authenticated.tpl | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/public/templates/mmcFE/statistics/blocks/default.tpl b/public/templates/mmcFE/statistics/blocks/default.tpl index 240b4a00..c1eac127 100644 --- a/public/templates/mmcFE/statistics/blocks/default.tpl +++ b/public/templates/mmcFE/statistics/blocks/default.tpl @@ -12,7 +12,7 @@ Expected {section block $BLOCKSFOUND step=-1} - {round(65536 * $BLOCKSFOUND[block].difficulty)} + {$BLOCKSFOUND[block].estshares} {/section} @@ -64,16 +64,15 @@ target and network difficulty and assuming a zero variance scenario. {else}{$GLOBAL.confirmations - $BLOCKSFOUND[block].confirmations} left{/if} {if $BLOCKSFOUND[block].is_anonymous|default:"0" == 1}anonymous{else}{$BLOCKSFOUND[block].finder|default:"unknown"|escape}{/if} {$BLOCKSFOUND[block].time|date_format:"%d/%m %H:%M:%S"} - {$BLOCKSFOUND[block].difficulty|number_format:"2"} + {$BLOCKSFOUND[block].difficulty|number_format:"8"} {$BLOCKSFOUND[block].amount|number_format:"2"} - {math assign="estshares" equation="(65536 * blockdiff)" blockdiff=$BLOCKSFOUND[block].difficulty} - {assign var="totalexpectedshares" value=$totalexpectedshares+$estshares} - {$estshares|number_format} + {$BLOCKSFOUND[block].estshares|number_format} + {assign var="totalexpectedshares" value=$totalexpectedshares+$BLOCKSFOUND[block].estshares} {$BLOCKSFOUND[block].shares|number_format} - {math assign="percentage" equation="shares / estshares * 100" shares=$BLOCKSFOUND[block].shares estshares=$estshares} + {math assign="percentage" equation="shares / estshares * 100" shares=$BLOCKSFOUND[block].shares estshares=$BLOCKSFOUND[block].estshares} {assign var="totalpercentage" value=$totalpercentage+$percentage} {$percentage|number_format:"2"} diff --git a/public/templates/mmcFE/statistics/pool/authenticated.tpl b/public/templates/mmcFE/statistics/pool/authenticated.tpl index 83ee505c..ff87137a 100644 --- a/public/templates/mmcFE/statistics/pool/authenticated.tpl +++ b/public/templates/mmcFE/statistics/pool/authenticated.tpl @@ -48,7 +48,8 @@ Est. Shares this Round - {(65536 * $DIFFICULTY)|number_format:"0"} (done: {(100 / (65536 * $DIFFICULTY) * $GLOBAL.roundshares.valid)|number_format:"2"} %) + {assign var=estshares value=(65536 * $DIFFICULTY) / pow(2, ($GLOBAL.config.targetdiff - 16))} + {$estshares|number_format:"0"} (done: {(100 / $estshares * $GLOBAL.roundshares.valid)|number_format:"2"} %) Time Since Last Block diff --git a/public/templates/mobile/statistics/pool/authenticated.tpl b/public/templates/mobile/statistics/pool/authenticated.tpl index d9e490b2..69588d9f 100644 --- a/public/templates/mobile/statistics/pool/authenticated.tpl +++ b/public/templates/mobile/statistics/pool/authenticated.tpl @@ -51,7 +51,7 @@ Est. Shares this Round - {(65536 * $DIFFICULTY)|number_format:"0"} (done: {(100 / (65536 * $DIFFICULTY) * $GLOBAL.roundshares.valid)|number_format:"2"} %) + {((65536 * $DIFFICULTY) / pow(2, ($GLOBAL.config.targetdiff - 16)))|number_format:"0"} (done: {(100 / ((65536 * $DIFFICULTY) / pow(2, ($GLOBAL.config.targetdiff - 16))) * $GLOBAL.roundshares.valid)|number_format:"2"} %) Time Since Last Block