cryptonote_core: try-catch in prepare same as cleanup

(cherry picked from commit f9d089a3e45338bfbb5abf88733b15718438a576)
This commit is contained in:
j-berman
2026-05-05 18:19:53 -04:00
committed by jwinterm
parent 93381db29c
commit 1c3773373e
+5 -1
View File
@@ -1349,7 +1349,11 @@ namespace cryptonote
bool core::prepare_handle_incoming_blocks(const std::vector<block_complete_entry> &blocks_entry, std::vector<block> &blocks)
{
m_incoming_tx_lock.lock();
if (!m_blockchain_storage.prepare_handle_incoming_blocks(blocks_entry, blocks))
bool success = false;
try { success = m_blockchain_storage.prepare_handle_incoming_blocks(blocks_entry, blocks); }
catch (const std::exception &e) { MERROR("Failed prepare handle incoming blocks: " << e.what()); }
catch (...) { MERROR("Failed prepare handling incoming blocks"); }
if (!success)
{
cleanup_handle_incoming_blocks(false);
return false;