From cf413487c5fe10ca3eb419e5c55a8b92608a0f2c Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Wed, 11 Jan 2017 03:43:20 +0000 Subject: [PATCH] rct_type added to index page --- src/page.h | 10 +++++++++- src/templates/index2.html | 4 ++-- src/templates/mempool.html | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/page.h b/src/page.h index a7d2abb..3aa022e 100644 --- a/src/page.h +++ b/src/page.h @@ -584,6 +584,8 @@ public: txd_map.insert({"time_delta", time_delta_str}); txd_map.insert({"age" , age.first}); txd_map.insert({"is_ringct" , (tx.version > 1)}); + txd_map.insert({"rct_type" , tx.rct_signatures.type}); + // do not show block info for other than // last (i.e., first after reverse below) @@ -704,18 +706,23 @@ public: mixin_no = mixin_numbers.at(0) - 1; json j_tx; - string is_ringct_str {"N/A"}; + + string is_ringct_str {"N/A"}; + string rct_type_str {"N/A"}; try { j_tx = json::parse(_tx_info.tx_json); + if (j_tx["version"].get() > 1) { is_ringct_str = "yes"; + rct_type_str = string("/") + to_string(j_tx["rct_signatures"]["type"].get()); } else { is_ringct_str = "no"; + rct_type_str = ""; } } catch (std::invalid_argument& e) @@ -734,6 +741,7 @@ public: {"no_inputs" , sum_inputs.second}, {"no_outputs" , sum_outputs.second}, {"is_ringct" , is_ringct_str}, + {"rct_type" , rct_type_str}, {"mixin" , fmt::format("{:d}", mixin_no)}, {"txsize" , fmt::format("{:0.2f}", static_cast(_tx_info.blob_size)/1024.0)} }); diff --git a/src/templates/index2.html b/src/templates/index2.html index 3da0a09..a741b10 100644 --- a/src/templates/index2.html +++ b/src/templates/index2.html @@ -39,7 +39,7 @@ fees outputs in/out - ringct? + rct/type mixin size [kB] @@ -52,7 +52,7 @@ {{sum_outputs_short}} {{no_inputs}}/{{no_outputs}} - {{#is_ringct}}yes{{/is_ringct}} + {{#is_ringct}}yes/{{rct_type}}{{/is_ringct}} {{^is_ringct}}no{{/is_ringct}} {{mixin}} diff --git a/src/templates/mempool.html b/src/templates/mempool.html index bfe1655..6ea7afe 100644 --- a/src/templates/mempool.html +++ b/src/templates/mempool.html @@ -11,7 +11,7 @@ fee outputs in/out - ringct? + rct/type mixin size [kB] @@ -23,7 +23,7 @@ {{fee}} {{xmr_outputs}} {{no_inputs}}/{{no_outputs}} - {{is_ringct}} + {{is_ringct}}{{rct_type}} {{mixin}} {{txsize}}