diff --git a/src/libwalletqt/WalletManager.cpp b/src/libwalletqt/WalletManager.cpp index 396274c6..a8346478 100644 --- a/src/libwalletqt/WalletManager.cpp +++ b/src/libwalletqt/WalletManager.cpp @@ -275,6 +275,11 @@ bool WalletManager::stopMining() return m_pimpl->stopMining(); } +bool WalletManager::localDaemonSynced() const +{ + return blockchainHeight() > 1 && blockchainHeight() >= blockchainTargetHeight(); +} + QString WalletManager::resolveOpenAlias(const QString &address) const { bool dnssec_valid = false; diff --git a/src/libwalletqt/WalletManager.h b/src/libwalletqt/WalletManager.h index bf9bf19a..69c63b05 100644 --- a/src/libwalletqt/WalletManager.h +++ b/src/libwalletqt/WalletManager.h @@ -112,6 +112,7 @@ public: Q_INVOKABLE quint64 blockchainHeight() const; Q_INVOKABLE quint64 blockchainTargetHeight() const; Q_INVOKABLE double miningHashRate() const; + Q_INVOKABLE bool localDaemonSynced() const; Q_INVOKABLE bool isMining() const; Q_INVOKABLE bool startMining(const QString &address, quint32 threads, bool backgroundMining, bool ignoreBattery);