From 472a275db05d79d7c16908299d154484ef7b8080 Mon Sep 17 00:00:00 2001 From: Alhuda Khan Date: Sat, 11 Jul 2026 19:41:26 +0530 Subject: [PATCH] take m_daemon_rpc_mutex in wallet2::get_daemon_address --- src/wallet/wallet2.cpp | 1 + src/wallet/wallet2.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index c128eda67..16504e3a1 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -12667,6 +12667,7 @@ std::string wallet2::get_keys_file() const std::string wallet2::get_daemon_address() const { + boost::lock_guard lock(m_daemon_rpc_mutex); return m_daemon_address; } diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index e310d6441..816fbc460 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -1659,7 +1659,7 @@ private: std::atomic m_run; - boost::recursive_mutex m_daemon_rpc_mutex; + mutable boost::recursive_mutex m_daemon_rpc_mutex; bool m_trusted_daemon; i_wallet2_callback* m_callback;