From 76d0e0a319db61a21b061c0ca42d90b6e7fa6244 Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Tue, 19 Apr 2016 07:13:16 +0000 Subject: [PATCH] in/out number added --- src/page.h | 12 ++++++++++++ src/templates/block.html | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/page.h b/src/page.h index 2d0807f..3c701e5 100644 --- a/src/page.h +++ b/src/page.h @@ -55,6 +55,12 @@ namespace xmreg { size_t version; uint64_t unlock_time; + // key images of inputs + vector input_key_imgs; + + // public keys and xmr amount of outputs + vector> output_pub_keys; + mstch::map get_mstch_map() @@ -70,6 +76,8 @@ namespace xmreg { {"tx_fee" , fmt::format("{:0.6f}", XMR_AMOUNT(fee))}, {"sum_inputs" , fmt::format("{:0.6f}", XMR_AMOUNT(xmr_inputs))}, {"sum_outputs" , fmt::format("{:0.6f}", XMR_AMOUNT(xmr_outputs))}, + {"no_inputs" , input_key_imgs.size()}, + {"no_outputs" , output_pub_keys.size()}, {"mixin" , std::to_string(mixin_no - 1)}, {"version" , std::to_string(version)}, {"unlock_time" , std::to_string(unlock_time)}, @@ -580,6 +588,10 @@ namespace xmreg { // get tx size in bytes txd.size = get_object_blobsize(tx); + txd.input_key_imgs = get_key_images(tx); + txd.output_pub_keys = get_ouputs(tx); + + // get tx version txd.version = tx.version; diff --git a/src/templates/block.html b/src/templates/block.html index 8031856..89c66c9 100644 --- a/src/templates/block.html +++ b/src/templates/block.html @@ -60,7 +60,8 @@ hash outputs fee - mixin no + mixin # + in/out # size [kB] version @@ -70,6 +71,7 @@ {{sum_outputs}} {{tx_fee}} {{mixin}} + {{no_inputs}}/{{no_outputs}} {{tx_size}} {{version}}