Fix to not being able to generate_key_derivation

https://github.com/moneroexamples/openmonero/issues/128
sync_microcore
moneroexamples 5 years ago
parent 4f6b104ad0
commit 6df55b056a

@ -34,12 +34,16 @@ OutputInputIdentification::OutputInputIdentification(
if (!generate_key_derivation(tx_pub_key, *viewkey, derivation))
{
OMERROR << "Cant get derived key for: " << "\n"
<< "pub_tx_key: " << get_tx_pub_key_str() << " and "
<< "prv_view_key" << viewkey;;
throw OutputInputIdentificationException(
"Cant get derived key for a tx");
OMWARN << "Cant get derived key for tx: "
<< pod_to_hex(tx_hash)
<< ", pub_tx_key: "
<< pod_to_hex(tx_pub_key);
static_assert(sizeof(derivation) == sizeof(rct::key),
"Mismatched sizes of key_derivation and rct::key");
// use identity derivation instead
memcpy(&derivation, rct::identity().bytes, sizeof(derivation));
}
}

Loading…
Cancel
Save