diff --git a/public/include/config/global.inc.dist.php b/public/include/config/global.inc.dist.php index 4a139582..b98dafc8 100644 --- a/public/include/config/global.inc.dist.php +++ b/public/include/config/global.inc.dist.php @@ -152,6 +152,20 @@ $config['accounts']['invitations']['count'] = 5; // Currency system used in this pool, default: `LTC` $config['currency'] = 'LTC'; +/** + * Coin Target in seconds + * + * Explanation + * Target time for coins to be generated + * + * Fastcoin: 12 seconds + * Litecoin: 2,5 minutes = 150 seconds + * Feathercoin: 2,5 minutes = 150 seconds + * Bitcoin: 10 minutes = 600 seconds + * + **/ +$config['cointarget'] = '12'; + /** * Default transaction fee to apply to user transactions * diff --git a/public/include/pages/statistics/blocks.inc.php b/public/include/pages/statistics/blocks.inc.php index d77663b4..ef697dc7 100644 --- a/public/include/pages/statistics/blocks.inc.php +++ b/public/include/pages/statistics/blocks.inc.php @@ -70,12 +70,16 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) { } $iHours = 24; + $now = new DateTime( "now" ); $aPoolStatistics = $statistics->getPoolStatsHours($iHours); - + $iFirstBlockFound = $statistics->getFirstBlockFound(); + $iTimeSinceFirstBlockFound = ($now->getTimestamp() - $iFirstBlockFound); + // Past blocks found, max 4 weeks back $iFoundBlocksByTime = $statistics->getLastBlocksbyTime(); - // Propagate content our template + $smarty->assign("FIRSTBLOCKFOUND", $iTimeSinceFirstBlockFound); + $smarty->assign("COINGENTIME", $config['cointarget']); $smarty->assign("LASTBLOCKSBYTIME", $iFoundBlocksByTime); $smarty->assign("BLOCKSFOUND", $aBlocksFoundData); $smarty->assign("BLOCKLIMIT", $iLimit); diff --git a/public/templates/mpos/statistics/blocks/block_overview_time.tpl b/public/templates/mpos/statistics/blocks/block_overview_time.tpl index 7b793a8b..bb8af5da 100644 --- a/public/templates/mpos/statistics/blocks/block_overview_time.tpl +++ b/public/templates/mpos/statistics/blocks/block_overview_time.tpl @@ -4,42 +4,62 @@ + Gen Found Valid Orphan + Rate All Time + {($FIRSTBLOCKFOUND / $COINGENTIME)} {$LASTBLOCKSBYTIME.Total} {$LASTBLOCKSBYTIME.TotalValid} {$LASTBLOCKSBYTIME.TotalOrphan} + {($LASTBLOCKSBYTIME.Total|default:"0.00" / (3600 / $COINGENTIME) * 100)|number_format:"2"} % Last Hour + {(3600 / $COINGENTIME)} {$LASTBLOCKSBYTIME.1HourTotal} {$LASTBLOCKSBYTIME.1HourValid} {$LASTBLOCKSBYTIME.1HourOrphan} + {($LASTBLOCKSBYTIME.1HourTotal|default:"0.00" / (3600 / $COINGENTIME) * 100)|number_format:"2"} % Last 24 Hours + {(86400 / $COINGENTIME)} {$LASTBLOCKSBYTIME.24HourTotal} {$LASTBLOCKSBYTIME.24HourValid} {$LASTBLOCKSBYTIME.24HourOrphan} + {($LASTBLOCKSBYTIME.24HourTotal|default:"0.00" / (86400 / $COINGENTIME) * 100)|number_format:"2"} % Last 7 Days + {(604800 / $COINGENTIME)} {$LASTBLOCKSBYTIME.7DaysTotal} {$LASTBLOCKSBYTIME.7DaysValid} {$LASTBLOCKSBYTIME.7DaysOrphan} + {($LASTBLOCKSBYTIME.7DaysTotal|default:"0.00" / (604800 / $COINGENTIME) * 100)|number_format:"2"} % Last 4 Weeks + {(2419200 / $COINGENTIME)} {$LASTBLOCKSBYTIME.4WeeksTotal} {$LASTBLOCKSBYTIME.4WeeksValid} {$LASTBLOCKSBYTIME.4WeeksOrphan} + {($LASTBLOCKSBYTIME.4WeeksTotal|default:"0.00" / (2419200 / $COINGENTIME) * 100)|number_format:"2"} % + + + Last 12 Month + {(29030400 / $COINGENTIME)} + {$LASTBLOCKSBYTIME.12MonthTotal} + {$LASTBLOCKSBYTIME.12MonthValid} + {$LASTBLOCKSBYTIME.12MonthOrphan} + {($LASTBLOCKSBYTIME.12MonthTotal|default:"0.00" / (29030400 / $COINGENTIME) * 100)|number_format:"2"} % - + \ No newline at end of file diff --git a/public/templates/mpos/statistics/blocks/block_shares_graph.tpl b/public/templates/mpos/statistics/blocks/block_shares_graph.tpl index fb27a2b9..cacbc2cf 100644 --- a/public/templates/mpos/statistics/blocks/block_shares_graph.tpl +++ b/public/templates/mpos/statistics/blocks/block_shares_graph.tpl @@ -36,6 +36,18 @@ {/if} + + + + + + + +
+ + + +