diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index 201d5293..c1c1b8e8 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -90,11 +90,9 @@ Wallet::Status Wallet::status() const Wallet::ConnectionStatus Wallet::connected() { - qDebug("Checking wallet connection status"); - // cache connection status - if(m_connectionStatusTime.elapsed() / 1000 > m_connectionStatusTtl){ - qDebug("connectionStatus query"); + if(!m_initialized || m_connectionStatusTime.elapsed() / 1000 > m_connectionStatusTtl){ + m_initialized = true; ConnectionStatus newStatus = static_cast(m_walletImpl->connected()); if(newStatus != m_connectionStatus) { m_connectionStatus = newStatus; @@ -442,6 +440,7 @@ Wallet::Wallet(Bitmonero::Wallet *w, QObject *parent) m_connectionStatusTime.restart(); m_daemonBlockChainHeightTime.restart(); m_daemonBlockChainTargetHeightTime.restart(); + m_initialized = false; } Wallet::~Wallet() diff --git a/src/libwalletqt/Wallet.h b/src/libwalletqt/Wallet.h index 6eddd8bd..8b1d7525 100644 --- a/src/libwalletqt/Wallet.h +++ b/src/libwalletqt/Wallet.h @@ -222,6 +222,7 @@ private: ConnectionStatus m_connectionStatus; int m_connectionStatusTtl; mutable QTime m_connectionStatusTime; + bool m_initialized; };