mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-03-20 22:28:53 +00:00
Merge pull request #271
c5206e1
Use daemon height if target height = 0 (Jaquee)
This commit is contained in:
commit
cd550be6ac
1 changed files with 5 additions and 0 deletions
|
@ -192,6 +192,11 @@ quint64 Wallet::daemonBlockChainTargetHeight() const
|
||||||
if (m_daemonBlockChainTargetHeight == 0
|
if (m_daemonBlockChainTargetHeight == 0
|
||||||
|| m_daemonBlockChainTargetHeightTime.elapsed() / 1000 > m_daemonBlockChainTargetHeightTtl) {
|
|| m_daemonBlockChainTargetHeightTime.elapsed() / 1000 > m_daemonBlockChainTargetHeightTtl) {
|
||||||
m_daemonBlockChainTargetHeight = m_walletImpl->daemonBlockChainTargetHeight();
|
m_daemonBlockChainTargetHeight = m_walletImpl->daemonBlockChainTargetHeight();
|
||||||
|
// Target height is set to 0 if daemon is synced.
|
||||||
|
// Use current height from daemon when target height < current height
|
||||||
|
if (m_daemonBlockChainTargetHeight < m_daemonBlockChainHeight){
|
||||||
|
m_daemonBlockChainTargetHeight = m_daemonBlockChainHeight;
|
||||||
|
}
|
||||||
m_daemonBlockChainTargetHeightTime.restart();
|
m_daemonBlockChainTargetHeightTime.restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue