m_refreshEnabled = false;
}
+void Wallet::updateNetworkStatus() {
+ const auto future = m_scheduler.run([this] {
+ if (!isHwBacked() || isDeviceConnected()) {
+ quint64 daemonHeight = m_walletImpl->daemonBlockChainHeight();
+ bool success = daemonHeight > 0;
+
+ quint64 targetHeight = 0;
+ if (success) {
+ targetHeight = m_walletImpl->daemonBlockChainTargetHeight();
+ }
+ bool haveHeights = (daemonHeight > 0 && targetHeight > 0);
+
+ emit heightsRefreshed(haveHeights, daemonHeight, targetHeight);
+ }
+ });
+}
+
void Wallet::startRefreshThread()
{
const auto future = m_scheduler.run([this] {
// ##### Synchronization (Refresh) #####
void startRefresh();
void pauseRefresh();
+ Q_INVOKABLE void updateNetworkStatus();
//! returns current wallet's block height
//! (can be less than daemon's blockchain height when wallet sync in progress)
info.emplace_back("Tor", TOR_VERSION);
info.emplace_back("SSL", QSslSocket::sslLibraryVersionString());
info.emplace_back("Mode", stagenet ? "Stagenet" : (testnet ? "Testnet" : "Mainnet"));
+ info.emplace_back("Network", conf()->get(Config::syncPaused).toBool() ? "PAUSED" : "ACTIVE");
for (const auto &k: info) {
qWarning().nospace().noquote() << QString("%1: %2").arg(k.first, k.second);