add localDaemonSynced()

This commit is contained in:
Jaquee 2017-08-06 16:47:11 +02:00
parent d78f9f5e70
commit 8553771f89
2 changed files with 6 additions and 0 deletions

View file

@ -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;

View file

@ -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);