mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #2638
529a6a4a
core: guard against a mined block not finding all txes in the pool (moneromooo-monero)
This commit is contained in:
commit
344c01c712
1 changed files with 9 additions and 1 deletions
|
@ -1029,7 +1029,15 @@ namespace cryptonote
|
||||||
block_verification_context bvc = boost::value_initialized<block_verification_context>();
|
block_verification_context bvc = boost::value_initialized<block_verification_context>();
|
||||||
m_miner.pause();
|
m_miner.pause();
|
||||||
std::list<block_complete_entry> blocks;
|
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);
|
prepare_handle_incoming_blocks(blocks);
|
||||||
m_blockchain_storage.add_new_block(b, bvc);
|
m_blockchain_storage.add_new_block(b, bvc);
|
||||||
cleanup_handle_incoming_blocks(true);
|
cleanup_handle_incoming_blocks(true);
|
||||||
|
|
Loading…
Reference in a new issue