output keys shown in checkign tx template

master
moneroexamples 8 years ago
parent 72d427499f
commit e4305061c9

@ -1544,7 +1544,7 @@ namespace xmreg {
string decoded_raw_tx_data = epee::string_encoding::base64_decode(raw_tx_data); string decoded_raw_tx_data = epee::string_encoding::base64_decode(raw_tx_data);
cout << decoded_raw_tx_data << endl; //cout << decoded_raw_tx_data << endl;
const size_t magiclen = strlen(UNSIGNED_TX_PREFIX); const size_t magiclen = strlen(UNSIGNED_TX_PREFIX);
@ -1630,9 +1630,23 @@ namespace xmreg {
tx_out_index toi = core_storage->get_db() tx_out_index toi = core_storage->get_db()
.get_output_tx_and_index(0, oe.first); .get_output_tx_and_index(0, oe.first);
transaction tx;
if (!mcore->get_tx(toi.first, tx))
{
cerr << "Cant get tx in blockchain: " << toi.first
<< ". \n Check mempool now" << endl;
// tx is nowhere to be found :-(
return string("Cant get tx: " + pod_to_hex(toi.first));
}
tx_details txd = get_tx_details(tx);
mstch::map single_output { mstch::map single_output {
{"out_index" , oe.first}, {"out_index" , oe.first},
{"tx_hash" , pod_to_hex(toi.first)}, {"tx_hash" , pod_to_hex(txd.hash)},
{"out_pub_key" , pod_to_hex(txd.output_pub_keys[toi.second].first.key)},
{"ctkey" , pod_to_hex(oe.second)} {"ctkey" , pod_to_hex(oe.second)}
}; };

@ -151,8 +151,8 @@
<table> <table>
<tr><td>Output Index</td>Stealth address<td>Is this real output</td></tr> <tr><td>Output Index</td>Stealth address<td>Is this real output</td></tr>
{{#outputs}} {{#outputs}}
<tr><td>{{out_index}}</td><td><a href="/tx/{{tx_hash}}">{{tx_hash}}</a></td><td></td></tr> <tr><td>{{out_index}}</td><td><a href="/tx/{{tx_hash}}">{{out_pub_key}}</a></td><td></td></tr>
<tr><td colspan="3">&nbsp; &nbsp; ctkey: {{ctkey}}</td></tr> <!-- <tr><td colspan="3">&nbsp; &nbsp; ctkey: {{ctkey}}</td></tr>-->
{{/outputs}} {{/outputs}}
</table> </table>
</td> </td>

Loading…
Cancel
Save