From 4d502eb2bfc18f20c03595b2e86041e42dfcd6da Mon Sep 17 00:00:00 2001 From: SomberNight Date: Sun, 16 Sep 2018 09:40:07 +0200 Subject: [PATCH] qt tx notifications: wait until sync finishes Comment is no longer relevant. Also, actually it was incorrect. Each txn is only downloaded once, though 'added' multiple times to the wallet. The triggers are only sent out by the Synchronizer, once, when downloaded. The actual reason for the inconsistency was that get_wallet_delta can only give complete results once the wallet is synced. --- electrum/gui/qt/main_window.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index 6271affa3..a4885303a 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -588,11 +588,10 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): self.show_message(msg, title="Electrum - " + _("Reporting Bugs")) def notify_transactions(self): - # note: during initial history sync for a wallet, many txns will be - # received multiple times. hence the "total amount received" can be - # a lot different than should be. this is expected though not intended if self.tx_notification_queue.qsize() == 0: return + if not self.wallet.up_to_date: + return # no notifications while syncing now = time.time() rate_limit = 20 # seconds if self.tx_notification_last_time + rate_limit > now: