Skip to content

Commit 8663014

Browse files
committed
Fix log spam while background syncing
1 parent 1c9b261 commit 8663014

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

Diff for: pages/History.qml

+1
Original file line numberDiff line numberDiff line change
@@ -1543,6 +1543,7 @@ Rectangle {
15431543
function updateTransactionsFromModel() {
15441544
// This function copies the items of `appWindow.currentWallet.historyModel` to `root.txModelData`, as a list of javascript objects
15451545
if(currentWallet == null || typeof currentWallet.history === "undefined" ) return;
1546+
if(currentWallet.isBackgroundSyncing()) return;
15461547

15471548
var _model = root.model;
15481549
var total = 0

Diff for: src/libwalletqt/Wallet.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,11 @@ bool Wallet::isBackgroundWallet() const
557557
return m_walletImpl->isBackgroundWallet();
558558
}
559559

560+
bool Wallet::isBackgroundSyncing() const
561+
{
562+
return m_walletImpl->isBackgroundSyncing();
563+
}
564+
560565
void Wallet::startBackgroundSync()
561566
{
562567
qDebug() << "Starting background sync";

Diff for: src/libwalletqt/Wallet.h

+1
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ class Wallet : public QObject, public PassprasePrompter
226226
Q_INVOKABLE void setupBackgroundSync(const BackgroundSyncType background_sync_type, const QString &wallet_password);
227227
Q_INVOKABLE BackgroundSyncType getBackgroundSyncType() const;
228228
Q_INVOKABLE bool isBackgroundWallet() const;
229+
Q_INVOKABLE bool isBackgroundSyncing() const;
229230

230231
//! scan in the background with just the view key (wipe the spend key)
231232
Q_INVOKABLE void startBackgroundSync();

0 commit comments

Comments
 (0)