From 85e22bc02f2a9fabb4e57eb47d1513ceaf45ddce Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Mon, 12 Aug 2013 10:07:19 +0200 Subject: [PATCH] Adding totals to block statistics * Total expected shares * Total actual shares * Average Percentage --- public/templates/mmcFE/statistics/blocks/default.tpl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/public/templates/mmcFE/statistics/blocks/default.tpl b/public/templates/mmcFE/statistics/blocks/default.tpl index c305d5a1..47f610c5 100644 --- a/public/templates/mmcFE/statistics/blocks/default.tpl +++ b/public/templates/mmcFE/statistics/blocks/default.tpl @@ -49,6 +49,7 @@ target and network difficulty and assuming a zero variance scenario. {assign var=rank value=1} {section block $BLOCKSFOUND} + {assign var="totalshares" value=$totalshares+$BLOCKSFOUND[block].shares} {$BLOCKSFOUND[block].height} @@ -63,6 +64,7 @@ target and network difficulty and assuming a zero variance scenario. {$BLOCKSFOUND[block].amount|number_format:"2"} {math assign="estshares" equation="(pow(2,32 - targetdiff) * blockdiff)" targetdiff=$GLOBAL.config.targetdiff blockdiff=$BLOCKSFOUND[block].difficulty} + {assign var="totalexpectedshares" value=$totalexpectedshares+$estshares} {$estshares|number_format} {$BLOCKSFOUND[block].shares|number_format} @@ -72,6 +74,13 @@ target and network difficulty and assuming a zero variance scenario. {/section} + + Totals + {$totalexpectedshares|number_format} + {$totalshares|number_format} + {math assign="totalpercentage" equation="shares / estshares * 100" shares=$totalshares estshares=$totalexpectedshares} + {$totalpercentage|number_format:"2"} +