From: gg Date: Tue, 20 Jan 2026 09:56:24 +0000 (-0500) Subject: fix issue of skip sync bringing paused wallet online X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=ec0dca7c6ff980379326d683910611ab6a675adf;p=gamesguru%2Ffeather.git fix issue of skip sync bringing paused wallet online --- diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 06fac103..a3447f49 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -276,8 +276,14 @@ void MainWindow::initStatusBar() { QString msg = tr("Skip sync will set your wallet's restore height to the current network height.\n\n" "Use this if you know you haven't received any transactions since your last sync.\n" "You can always use 'Full Sync' to rescan from the beginning.\n\n" + "Note: This process could take 30 seconds or more.\n\n" "Continue?"); + if (m_wallet->daemonBlockChainTargetHeight() == 0) { + Utils::showError(this, tr("Skip Sync"), tr("Cannot skip to tip: unknown network target height.\nPlease wait for the wallet to connect to a daemon.")); + return; + } + if (QMessageBox::question(this, tr("Skip Sync"), msg) == QMessageBox::Yes) { m_wallet->skipToTip(); this->setStatusText(tr("Skipped sync to tip.")); diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index 13817c88..1d6b2945 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -754,8 +754,10 @@ void Wallet::skipToTip() { m_wallet2->set_refresh_from_block_height(target); m_lastSyncTime = QDateTime::currentDateTime().toMSecsSinceEpoch(); - setConnectionStatus(ConnectionStatus_Synchronized); - startRefresh(true); + if (!m_syncPaused) { + setConnectionStatus(ConnectionStatus_Synchronized); + startRefresh(true); + } emit syncStatus(target, target, true); }