rct_type added to index page

master
moneroexamples 8 years ago
parent 937c31f587
commit cf413487c5

@ -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 rct_type_str {"N/A"};
try
{
j_tx = json::parse(_tx_info.tx_json);
if (j_tx["version"].get<size_t>() > 1)
{
is_ringct_str = "yes";
rct_type_str = string("/") + to_string(j_tx["rct_signatures"]["type"].get<uint8_t>());
}
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<double>(_tx_info.blob_size)/1024.0)}
});

@ -39,7 +39,7 @@
<td>fees</td>
<td>outputs</td>
<td>in/out</td>
<td>ringct?</td>
<td>rct/type</td>
<td>mixin</td>
<td>size [kB]</td>
</tr>
@ -52,7 +52,7 @@
<td>{{sum_outputs_short}}</td>
<td>{{no_inputs}}/{{no_outputs}}</td>
<td>
{{#is_ringct}}yes{{/is_ringct}}
{{#is_ringct}}yes/{{rct_type}}{{/is_ringct}}
{{^is_ringct}}no{{/is_ringct}}
</td>
<td>{{mixin}}</td>

@ -11,7 +11,7 @@
<td>fee</td>
<td>outputs</td>
<td>in/out</td>
<td>ringct?</td>
<td>rct/type</td>
<td>mixin</td>
<td>size [kB]</td>
</tr>
@ -23,7 +23,7 @@
<td>{{fee}}</td>
<td>{{xmr_outputs}}</td>
<td>{{no_inputs}}/{{no_outputs}}</td>
<td>{{is_ringct}}</td>
<td>{{is_ringct}}{{rct_type}}</td>
<td>{{mixin}}</td>
<td>{{txsize}}</td>
</tr>

Loading…
Cancel
Save