output keys shown in checkign tx template

This commit is contained in:
moneroexamples 2016-09-30 10:35:43 +08:00
parent 72d427499f
commit e4305061c9
2 changed files with 18 additions and 4 deletions

View File

@ -1544,7 +1544,7 @@ namespace xmreg {
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);
@ -1630,9 +1630,23 @@ namespace xmreg {
tx_out_index toi = core_storage->get_db()
.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 {
{"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)}
};

View File

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