aboutsummaryrefslogtreecommitdiff
path: root/src/libwalletqt/Wallet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libwalletqt/Wallet.cpp')
-rw-r--r--src/libwalletqt/Wallet.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp
index 2f106aed..629106da 100644
--- a/src/libwalletqt/Wallet.cpp
+++ b/src/libwalletqt/Wallet.cpp
@@ -348,6 +348,19 @@ void Wallet::setSubaddressLabel(quint32 accountIndex, quint32 addressIndex, cons
m_walletImpl->setSubaddressLabel(accountIndex, addressIndex, label.toStdString());
}
+void Wallet::refreshHeightAsync() const
+{
+ QtConcurrent::run([this] {
+ QFuture<quint64> daemonHeight = QtConcurrent::run([this] {
+ return daemonBlockChainHeight();
+ });
+ QFuture<quint64> targetHeight = QtConcurrent::run([this] {
+ return daemonBlockChainTargetHeight();
+ });
+ emit heightRefreshed(blockChainHeight(), daemonHeight.result(), targetHeight.result());
+ });
+}
+
quint64 Wallet::blockChainHeight() const
{
return m_walletImpl->blockChainHeight();