mirror of
https://github.com/monero-project/monero.git
synced 2026-07-30 23:50:24 -07:00
Merge pull request #10481
f855ffe wallet2: throw if reserve proof can't be parsed (tobtoht)
This commit is contained in:
+10
-4
@@ -13387,13 +13387,19 @@ bool wallet2::check_reserve_proof(const cryptonote::account_public_address &addr
|
|||||||
loaded = true;
|
loaded = true;
|
||||||
}
|
}
|
||||||
catch(...) {}
|
catch(...) {}
|
||||||
if (!loaded && m_load_deprecated_formats)
|
try
|
||||||
{
|
{
|
||||||
std::istringstream iss(sig_decoded);
|
if (!loaded && m_load_deprecated_formats)
|
||||||
boost::archive::portable_binary_iarchive ar(iss);
|
{
|
||||||
ar >> proofs >> subaddr_spendkeys.parent();
|
std::istringstream iss(sig_decoded);
|
||||||
|
boost::archive::portable_binary_iarchive ar(iss);
|
||||||
|
ar >> proofs >> subaddr_spendkeys.parent();
|
||||||
|
loaded = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
catch(...) {}
|
||||||
|
|
||||||
|
THROW_WALLET_EXCEPTION_IF(!loaded, error::wallet_internal_error, "Failed to parse reserve proof signature data");
|
||||||
THROW_WALLET_EXCEPTION_IF(subaddr_spendkeys.count(address.m_spend_public_key) == 0, error::wallet_internal_error,
|
THROW_WALLET_EXCEPTION_IF(subaddr_spendkeys.count(address.m_spend_public_key) == 0, error::wallet_internal_error,
|
||||||
"The given address isn't found in the proof");
|
"The given address isn't found in the proof");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user