Merge pull request #632

2cf8b32 wallet: guard against exception in process_blocks (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2016-01-31 15:20:47 +02:00
commit 58f890652e
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

View file

@ -753,7 +753,15 @@ void wallet2::refresh(uint64_t start_height, uint64_t & blocks_fetched, bool& re
bool error = false;
pull_thread = std::thread([&]{pull_next_blocks(start_height, next_blocks_start_height, short_chain_history, blocks, next_blocks, error);});
process_blocks(blocks_start_height, blocks, added_blocks);
try
{
process_blocks(blocks_start_height, blocks, added_blocks);
}
catch (...)
{
pull_thread.join();
throw;
}
blocks_fetched += added_blocks;
pull_thread.join();
if(!added_blocks)