mirror of
https://github.com/wownero/wownero.git
synced 2026-10-20 08:58:36 +02:00
wallet2: fix data races in refresh error handlers
This commit is contained in:
@@ -4177,6 +4177,7 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo
|
|||||||
}
|
}
|
||||||
catch (const tools::error::out_of_hashchain_bounds_error&)
|
catch (const tools::error::out_of_hashchain_bounds_error&)
|
||||||
{
|
{
|
||||||
|
waiter.wait();
|
||||||
MINFO("Daemon claims next refresh block is out of hash chain bounds, resetting hash chain");
|
MINFO("Daemon claims next refresh block is out of hash chain bounds, resetting hash chain");
|
||||||
uint64_t stop_height = m_blockchain.offset();
|
uint64_t stop_height = m_blockchain.offset();
|
||||||
std::vector<crypto::hash> tip(m_blockchain.size() - m_blockchain.offset());
|
std::vector<crypto::hash> tip(m_blockchain.size() - m_blockchain.offset());
|
||||||
@@ -4200,6 +4201,7 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo
|
|||||||
}
|
}
|
||||||
catch (const std::exception &e)
|
catch (const std::exception &e)
|
||||||
{
|
{
|
||||||
|
waiter.wait();
|
||||||
MERROR("Error parsing blocks: " << e.what());
|
MERROR("Error parsing blocks: " << e.what());
|
||||||
exception = std::current_exception();
|
exception = std::current_exception();
|
||||||
error = true;
|
error = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user