]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
fix full sync
authorgg <chown_tee@proton.me>
Tue, 20 Jan 2026 09:26:21 +0000 (04:26 -0500)
committergg <chown_tee@proton.me>
Tue, 20 Jan 2026 09:26:21 +0000 (04:26 -0500)
src/libwalletqt/Wallet.cpp

index 47bd1e3df4b1204177c4ba97da530d54e4d2d322..b55c3705f138dc6ce6035b0221143bb8abfce828 100644 (file)
@@ -603,29 +603,29 @@ void Wallet::startRefreshThread()
                             m_newWallet = false;
                         }
 
-                    quint64 walletHeight = m_walletImpl->blockChainHeight();
+                        quint64 walletHeight = m_walletImpl->blockChainHeight();
 
-                    if (m_rangeSyncActive) {
-                        uint64_t max_blocks = (m_stopHeight > walletHeight) ? (m_stopHeight - walletHeight) : 1;
-                        uint64_t blocks_fetched = 0;
-                        bool received_money = false;
+                        if (m_rangeSyncActive) {
+                            uint64_t max_blocks = (m_stopHeight > walletHeight) ? (m_stopHeight - walletHeight) : 1;
+                            uint64_t blocks_fetched = 0;
+                            bool received_money = false;
 
-                        // Ensure we respect the wallet creation height (restore height) if it's set higher than current
-                        uint64_t startHeight = std::max((uint64_t)walletHeight, m_wallet2->get_refresh_from_block_height());
+                            // Ensure we respect the wallet creation height (restore height) if it's set higher than current
+                            uint64_t startHeight = std::max((uint64_t)walletHeight, m_wallet2->get_refresh_from_block_height());
 
-                        m_wallet2->refresh(m_wallet2->is_trusted_daemon(), startHeight, blocks_fetched, received_money, true, true, max_blocks);
+                            m_wallet2->refresh(m_wallet2->is_trusted_daemon(), startHeight, blocks_fetched, received_money, true, true, max_blocks);
 
-                        if (m_walletImpl->blockChainHeight() >= m_stopHeight) {
-                            m_rangeSyncActive = false;
-                            if (m_syncPaused) {
-                                setConnectionStatus(ConnectionStatus_Idle);
+                            if (m_walletImpl->blockChainHeight() >= m_stopHeight) {
+                                m_rangeSyncActive = false;
+                                if (m_syncPaused) {
+                                    setConnectionStatus(ConnectionStatus_Idle);
+                                }
                             }
+                        } else {
+                            m_walletImpl->refresh();
                         }
-                    } else {
-                        m_walletImpl->refresh();
                     }
                 }
-                }
             }
 
             std::this_thread::sleep_for(intervalResolution);