diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2022-06-20 18:45:10 +0000 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2022-06-20 22:17:57 +0000 |
| commit | 4278a3a7e32ced988474260e0ed6ad21228a41e5 (patch) | |
| tree | aec1bf264d01da97b95c4b231056e53e7cf093ba /src/cryptonote_basic | |
| parent | 9750e1fa103539b3e533455500610aae76e253a5 (diff) | |
| download | monzero-core-4278a3a7e32ced988474260e0ed6ad21228a41e5.tar.gz monzero-core-4278a3a7e32ced988474260e0ed6ad21228a41e5.tar.xz monzero-core-4278a3a7e32ced988474260e0ed6ad21228a41e5.zip | |
cryptonote_basic: catch crypto api errors
Diffstat (limited to 'src/cryptonote_basic')
| -rw-r--r-- | src/cryptonote_basic/cryptonote_format_utils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptonote_basic/cryptonote_format_utils.cpp b/src/cryptonote_basic/cryptonote_format_utils.cpp index f101f10c5..388013f96 100644 --- a/src/cryptonote_basic/cryptonote_format_utils.cpp +++ b/src/cryptonote_basic/cryptonote_format_utils.cpp @@ -1042,7 +1042,7 @@ namespace cryptonote crypto::public_key subaddress_spendkey; if (out_can_be_to_acc(view_tag_opt, derivation, output_index)) { - hwdev.derive_subaddress_public_key(out_key, derivation, output_index, subaddress_spendkey); + CHECK_AND_ASSERT_MES(hwdev.derive_subaddress_public_key(out_key, derivation, output_index, subaddress_spendkey), boost::none, "Failed to derive subaddress public key"); auto found = subaddresses.find(subaddress_spendkey); if (found != subaddresses.end()) return subaddress_receive_info{ found->second, derivation }; @@ -1054,7 +1054,7 @@ namespace cryptonote CHECK_AND_ASSERT_MES(output_index < additional_derivations.size(), boost::none, "wrong number of additional derivations"); if (out_can_be_to_acc(view_tag_opt, additional_derivations[output_index], output_index)) { - hwdev.derive_subaddress_public_key(out_key, additional_derivations[output_index], output_index, subaddress_spendkey); + CHECK_AND_ASSERT_MES(hwdev.derive_subaddress_public_key(out_key, additional_derivations[output_index], output_index, subaddress_spendkey), boost::none, "Failed to derive subaddress public key"); auto found = subaddresses.find(subaddress_spendkey); if (found != subaddresses.end()) return subaddress_receive_info{ found->second, additional_derivations[output_index] }; |
