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());
}
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()) {
// 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();
const quint64 kdfRounds = 1;
const QString seedLanguage = "English"; // todo: move me
+ const int defaultRefreshInterval = 30; // seconds
}
#endif //FEATHER_CONSTANTS_H
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()) {
{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}},
{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}},
// Sync & data saver
syncPaused,
- syncInterval,
lastKnownNetworkHeight,
lastNetInfoUpdate,
lastSyncTimestamp,
lastPriceUpdateTimestamp,
- scanMempoolWhenPaused,
};
enum PrivacyLevel {