From: gg Date: Mon, 19 Jan 2026 19:46:18 +0000 (-0500) Subject: remove syncInterval stuff X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=d2beca4786d9003589a25162b27b475b94834dc1;p=gamesguru%2Ffeather.git remove syncInterval stuff --- diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index a18e5833..77c96f57 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -130,9 +130,6 @@ MainWindow::MainWindow(WindowManager *windowManager, Wallet *wallet, QWidget *pa conf()->set(Config::firstRun, false); connect(conf(), &Config::changed, this, [this](Config::ConfigKey key){ - if (key == Config::syncInterval && m_wallet) { - m_wallet->setRefreshInterval(conf()->get(Config::syncInterval).toInt()); - } if (key == Config::syncPaused) { this->setSyncPaused(conf()->get(Config::syncPaused).toBool()); } @@ -737,7 +734,7 @@ void MainWindow::onWalletOpened() { m_wallet->setRingDatabase(Utils::ringDatabasePath()); - m_wallet->setRefreshInterval(conf()->get(Config::syncInterval).toInt()); + m_wallet->setRefreshInterval(constants::defaultRefreshInterval); m_wallet->updateBalance(); if (m_wallet->isHwBacked()) { @@ -1024,7 +1021,7 @@ void MainWindow::onSyncStatus(quint64 height, quint64 target, bool daemonSync) { // Persist to global config (throttled to syncInterval) static QDateTime lastConfigSave = QDateTime::currentDateTime(); - int interval = conf()->get(Config::syncInterval).toInt(); + int interval = constants::defaultRefreshInterval; if (lastConfigSave.secsTo(QDateTime::currentDateTime()) > interval) { conf()->set(Config::lastNetInfoUpdate, static_cast(m_lastNetInfoUpdate.toSecsSinceEpoch())); lastConfigSave = QDateTime::currentDateTime(); diff --git a/src/constants.h b/src/constants.h index 567cc143..d4c666b1 100644 --- a/src/constants.h +++ b/src/constants.h @@ -19,6 +19,7 @@ namespace constants const quint64 kdfRounds = 1; const QString seedLanguage = "English"; // todo: move me + const int defaultRefreshInterval = 30; // seconds } #endif //FEATHER_CONSTANTS_H diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index 25366711..ebb9bdd6 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -531,7 +531,7 @@ void Wallet::startRefreshThread() if (elapsed >= std::chrono::seconds(m_refreshInterval) || m_refreshNow) { if (m_syncPaused && !m_rangeSyncActive) { - bool shouldScanMempool = m_refreshNow || conf()->get(Config::scanMempoolWhenPaused).toBool(); + bool shouldScanMempool = m_refreshNow; if (shouldScanMempool) { if (m_wallet2->get_daemon_address().empty()) { diff --git a/src/utils/config.cpp b/src/utils/config.cpp index c6720fa4..f11f89df 100644 --- a/src/utils/config.cpp +++ b/src/utils/config.cpp @@ -81,7 +81,6 @@ static const QHash configStrings = { {Config::offlineMode, {QS("offlineMode"), false}}, {Config::syncPaused, {QS("syncPaused"), false}}, - {Config::syncInterval, {QS("syncInterval"), 30}}, {Config::lastKnownNetworkHeight, {QS("lastKnownNetworkHeight"), 0}}, {Config::lastSyncTimestamp, {QS("lastSyncTimestamp"), 0}}, {Config::lastPriceUpdateTimestamp, {QS("lastPriceUpdateTimestamp"), 0}}, @@ -132,7 +131,6 @@ static const QHash configStrings = { {Config::torManagedPort, {QS("torManagedPort"), "19450"}}, {Config::useLocalTor, {QS("useLocalTor"), false}}, {Config::initSyncThreshold, {QS("initSyncThreshold"), 360}}, - {Config::scanMempoolWhenPaused, {QS("scanMempoolWhenPaused"), false}}, {Config::enabledPlugins, {QS("enabledPlugins"), QStringList{"tickers", "crowdfunding", "revuo", "calc"}}}, {Config::restartRequired, {QS("restartRequired"), false}}, diff --git a/src/utils/config.h b/src/utils/config.h index d43935b0..d12c8098 100644 --- a/src/utils/config.h +++ b/src/utils/config.h @@ -145,12 +145,10 @@ public: // Sync & data saver syncPaused, - syncInterval, lastKnownNetworkHeight, lastNetInfoUpdate, lastSyncTimestamp, lastPriceUpdateTimestamp, - scanMempoolWhenPaused, }; enum PrivacyLevel {