mirror of
https://github.com/wownero/wownero.git
synced 2026-10-26 02:48:33 +01:00
cryptonote_core: try-catch in prepare same as cleanup
This commit is contained in:
@@ -1407,7 +1407,11 @@ namespace cryptonote
|
|||||||
bool core::prepare_handle_incoming_blocks(const std::vector<block_complete_entry> &blocks_entry, std::vector<block> &blocks)
|
bool core::prepare_handle_incoming_blocks(const std::vector<block_complete_entry> &blocks_entry, std::vector<block> &blocks)
|
||||||
{
|
{
|
||||||
m_incoming_tx_lock.lock();
|
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);
|
cleanup_handle_incoming_blocks(false);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user