From f4d8de397cc02007b1df7ec99fab09aa06a77637 Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Tue, 22 Nov 2016 05:24:45 +0800 Subject: [PATCH] Reding no of tx on index page from 50 to 25. --- src/page.h | 8 ++++++-- src/templates/index2.html | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/page.h b/src/page.h index 34b1247..f1f48c1 100644 --- a/src/page.h +++ b/src/page.h @@ -475,7 +475,7 @@ namespace xmreg { server_timestamp = std::time(nullptr); // number of last blocks to show - uint64_t no_of_last_blocks {50 + 1}; + uint64_t no_of_last_blocks {25 + 1}; // get the current blockchain height. Just to check uint64_t height = @@ -724,10 +724,14 @@ namespace xmreg { //cout << "_blk_height: " << _blk_height << endl; - if (_blk_height > core_storage->get_current_blockchain_height()) + uint64_t current_blockchain_height + = core_storage->get_current_blockchain_height(); + + if (_blk_height > current_blockchain_height) { cerr << "Cant get block: " << _blk_height << " since its higher than current blockchain height" + << "i.e., " << current_blockchain_height << endl; return fmt::format("Cant get block {:d} since its higher than current blockchain height!", _blk_height); diff --git a/src/templates/index2.html b/src/templates/index2.html index bf37e49..87fa027 100644 --- a/src/templates/index2.html +++ b/src/templates/index2.html @@ -22,7 +22,7 @@ {{{mempool_info}}} {{#is_page_zero}} -

Transactions in the last 50 blocks

+

Transactions in the last 25 blocks

{{/is_page_zero}} {{^is_page_zero}}

Transactions in older blocks