From fde06da42d7387c27856a096d491787d774c7513 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 21 Aug 2026 12:46:13 +0200 Subject: [PATCH] wallet2: fix data races in refresh error handlers --- src/wallet/wallet2.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 91a5420d7..fbcc8cf49 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -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&) { + waiter.wait(); MINFO("Daemon claims next refresh block is out of hash chain bounds, resetting hash chain"); uint64_t stop_height = m_blockchain.offset(); std::vector 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) { + waiter.wait(); MERROR("Error parsing blocks: " << e.what()); exception = std::current_exception(); error = true;