diff --git a/src/page.h b/src/page.h index 0d6a51a..0e9d7ee 100644 --- a/src/page.h +++ b/src/page.h @@ -582,12 +582,12 @@ index2(uint64_t page_no = 0, bool refresh_page = false) uint64_t local_copy_server_timestamp = server_timestamp; - // number of last blocks to show - uint64_t no_of_last_blocks {no_blocks_on_index + 1}; - // get the current blockchain height. Just to check uint64_t height = core_storage->get_current_blockchain_height(); + // number of last blocks to show + uint64_t no_of_last_blocks = std::min(no_blocks_on_index + 1, height); + // initalise page tempate map with basic info about blockchain mstch::map context { {"testnet" , testnet},