diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index cec3f7225..61f844612 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -1029,7 +1029,15 @@ namespace cryptonote block_verification_context bvc = boost::value_initialized<block_verification_context>(); m_miner.pause(); std::list<block_complete_entry> blocks; - blocks.push_back(get_block_complete_entry(b, m_mempool)); + try + { + blocks.push_back(get_block_complete_entry(b, m_mempool)); + } + catch (const std::exception &e) + { + m_miner.resume(); + return false; + } prepare_handle_incoming_blocks(blocks); m_blockchain_storage.add_new_block(b, bvc); cleanup_handle_incoming_blocks(true); |