]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
remove syncInterval stuff
authorgg <chown_tee@proton.me>
Mon, 19 Jan 2026 19:46:18 +0000 (14:46 -0500)
committergg <chown_tee@proton.me>
Mon, 19 Jan 2026 19:55:51 +0000 (14:55 -0500)
src/MainWindow.cpp
src/constants.h
src/libwalletqt/Wallet.cpp
src/utils/config.cpp
src/utils/config.h

index a18e5833c80850a78fe89aa4d4d03e77e37facf2..77c96f5796fe0c15fe847eebc8a6f9cc114b176e 100644 (file)
@@ -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<qulonglong>(m_lastNetInfoUpdate.toSecsSinceEpoch()));
         lastConfigSave = QDateTime::currentDateTime();
index 567cc143c3a98c2555124fd7f66443e07a5cc7ec..d4c666b13cf23cbcc77889f501ee9468268b4e0a 100644 (file)
@@ -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
index 2536671169b7099c4460cf0706ab533cfe1a2d50..ebb9bdd6dd385b8d1425312f9c199593c3dc20fd 100644 (file)
@@ -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()) {
index c6720fa4e871f09072fcdb7e01a9b331d32a6c5a..f11f89df72bb481a2c8d230c2d7e889421b4ad58 100644 (file)
@@ -81,7 +81,6 @@ static const QHash<Config::ConfigKey, ConfigDirective> 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<Config::ConfigKey, ConfigDirective> 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}},
index d43935b01d6bc125bfa39dd1a2b77d2e5cae5dd7..d12c80987be3b4d20dda4cab0d75946120eeb20d 100644 (file)
@@ -145,12 +145,10 @@ public:
 
         // Sync & data saver
         syncPaused,
-        syncInterval,
         lastKnownNetworkHeight,
         lastNetInfoUpdate,
         lastSyncTimestamp,
         lastPriceUpdateTimestamp,
-        scanMempoolWhenPaused,
     };
 
     enum PrivacyLevel {