From cf54281ae29aec6873aa673ada353678954e7fa2 Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Thu, 24 Aug 2017 13:32:48 +0800 Subject: [PATCH] bring back median size of blocks on front page --- src/page.h | 4 ++++ src/templates/index2.html | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/page.h b/src/page.h index b79eac2..24a42dc 100644 --- a/src/page.h +++ b/src/page.h @@ -679,6 +679,10 @@ namespace xmreg } // while (i <= end_height) + // calculate median size of the blocks shown + double blk_size_median = xmreg::calc_median(blk_sizes.begin(), blk_sizes.end()); + + context["blk_size_median"] = fmt::format("{:0.2f}", blk_size_median); // save computational times for disply in the frontend diff --git a/src/templates/index2.html b/src/templates/index2.html index ae7f4cf..c1fd991 100644 --- a/src/templates/index2.html +++ b/src/templates/index2.html @@ -64,8 +64,7 @@

Transactions in older blocks

{{/is_page_zero}} - - +

(Median size of these blocks: {{blk_size_median}} kB)