diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-10-15 18:58:57 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-10-15 18:58:57 +0200 |
commit | 344c01c71235d43e156da26053020a3696393ea5 (patch) | |
tree | c09dfd3461d2a5a3c41b9d13b70dcf1212ce3c2f | |
parent | Merge pull request #2613 (diff) | |
parent | core: guard against a mined block not finding all txes in the pool (diff) | |
download | monero-344c01c71235d43e156da26053020a3696393ea5.tar.xz |
Merge pull request #2638
529a6a4a core: guard against a mined block not finding all txes in the pool (moneromooo-monero)
-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); |