diff --git a/public/templates/mmcFE/statistics/blocks/default.tpl b/public/templates/mmcFE/statistics/blocks/default.tpl index fb2a799d..87b9ecb5 100644 --- a/public/templates/mmcFE/statistics/blocks/default.tpl +++ b/public/templates/mmcFE/statistics/blocks/default.tpl @@ -47,11 +47,13 @@ target and network difficulty and assuming a zero variance scenario. -{assign var=rank value=1} +{assign var=count value=0} {assign var=totalexpectedshares value=0} {assign var=totalshares value=0} +{assign var=totalpercentage value=0} {section block $BLOCKSFOUND} {assign var="totalshares" value=$totalshares+$BLOCKSFOUND[block].shares} + {assign var="count" value=$count+1} {$BLOCKSFOUND[block].height} @@ -72,6 +74,7 @@ target and network difficulty and assuming a zero variance scenario. {$BLOCKSFOUND[block].shares|number_format} {math assign="percentage" equation="shares / estshares * 100" shares=$BLOCKSFOUND[block].shares estshares=$estshares} + {assign var="totalpercentage" value=$totalpercentage+$percentage} {$percentage|number_format:"2"} @@ -80,8 +83,7 @@ target and network difficulty and assuming a zero variance scenario. Totals {$totalexpectedshares|number_format} {$totalshares|number_format} - {math assign="totalpercentage" equation="shares / estshares * 100" shares=$totalshares estshares=$totalexpectedshares} - {$totalpercentage|number_format:"2"} + {($totalpercentage / $count)|number_format:"2"}