diff --git a/src/page.h b/src/page.h index 2003be6..2fc0eb4 100644 --- a/src/page.h +++ b/src/page.h @@ -937,14 +937,22 @@ namespace xmreg block alt_blk; string error_msg; - blocks.push_back(mstch::map { - {"hash", alt_blk_hash} - }); + int64_t no_of_txs {-1}; + int64_t blk_height {-1}; if (rpc.get_block(alt_blk_hash, alt_blk, error_msg)) { - cout << " - alt block txs no: " << alt_blk.tx_hashes.size() << endl; + no_of_txs = alt_blk.tx_hashes.size(); + blk_height = get_block_height(alt_blk); + cout << "alt blk_height: " << blk_height << ", "; + cout << "txs no: " << alt_blk.tx_hashes.size() << endl; } + + blocks.push_back(mstch::map { + {"hash" , alt_blk_hash}, + {"no_of_txs", no_of_txs} + }); + } add_css_style(context); @@ -1149,7 +1157,7 @@ namespace xmreg else { cerr << "Cant get block: " << blk_hash << endl; - return fmt::format("Cant get block {:s} for some uknown reason", blk_hash); + return fmt::format("Cant get block {:s}", blk_hash); } return show_block(blk_height); diff --git a/src/templates/altblocks.html b/src/templates/altblocks.html index e7fba75..ddf81c1 100644 --- a/src/templates/altblocks.html +++ b/src/templates/altblocks.html @@ -7,10 +7,12 @@
hash | +txs no |
{{hash}} | +{{no_of_txs}} |