fix: decoding key image file data

master
moneroexamples 8 years ago
parent 7da52875a8
commit 2f5b0fe6b6

@ -2750,30 +2750,35 @@ public:
// seems we found our output. so now lets decode its amount // seems we found our output. so now lets decode its amount
// using ringct // using ringct
bool r; if (output_source_tx.version == 2
&& !is_coinbase(output_source_tx))
{
bool r;
r = decode_ringct(output_source_tx.rct_signatures, r = decode_ringct(output_source_tx.rct_signatures,
tx_pub_key, tx_pub_key,
prv_view_key, prv_view_key,
output_idx_in_tx, output_idx_in_tx,
output_source_tx.rct_signatures.ecdhInfo[output_idx_in_tx].mask, output_source_tx.rct_signatures.ecdhInfo[output_idx_in_tx].mask,
rct_amount); rct_amount);
if (!r) if (!r)
{ {
string error_msg = fmt::format( string error_msg = fmt::format(
"Cant decode ringCT for " "Cant decode ringCT for "
"pub_tx_key: {:s} " "pub_tx_key: {:s} "
"using prv_view_key: {:s}", "using prv_view_key: {:s}",
tx_pub_key, prv_view_key); tx_pub_key, prv_view_key);
context["has_error"] = true;
context["error_msg"] = error_msg;
context["has_error"] = true; return mstch::render(full_page, context);
context["error_msg"] = error_msg; }
return mstch::render(full_page, context); xmr_amount = rct_amount;
}
xmr_amount = rct_amount; } // if (output_source_tx.version == 2 && !is_coinbase(output_source_tx))
break; break;

Loading…
Cancel
Save