mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-04 14:37:25 -04:00
Wallet: async fetching wallet, daemon and target height
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user