mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-27 05:13:25 +01:00
blockchain: avoid exceptions in output verification
This can happen if we get a bad tx, so let's not spam the log.
This commit is contained in:
parent
86e9de588c
commit
5db433b3f7
@ -188,7 +188,12 @@ bool Blockchain::scan_outputkeys_for_indexes(size_t tx_version, const txin_to_ke
|
||||
{
|
||||
try
|
||||
{
|
||||
m_db->get_output_key(tx_in_to_key.amount, absolute_offsets, outputs);
|
||||
m_db->get_output_key(tx_in_to_key.amount, absolute_offsets, outputs, true);
|
||||
if (absolute_offsets.size() != outputs.size())
|
||||
{
|
||||
MERROR_VER("Output does not exist! amount = " << tx_in_to_key.amount);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@ -208,7 +213,12 @@ bool Blockchain::scan_outputkeys_for_indexes(size_t tx_version, const txin_to_ke
|
||||
add_offsets.push_back(absolute_offsets[i]);
|
||||
try
|
||||
{
|
||||
m_db->get_output_key(tx_in_to_key.amount, add_offsets, add_outputs);
|
||||
m_db->get_output_key(tx_in_to_key.amount, add_offsets, add_outputs, true);
|
||||
if (add_offsets.size() != add_outputs.size())
|
||||
{
|
||||
MERROR_VER("Output does not exist! amount = " << tx_in_to_key.amount);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user