Browse Source

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.
3.3.3.1
SomberNight 7 years ago
parent
commit
4d502eb2bf
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 5
      electrum/gui/qt/main_window.py

5
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:

Loading…
Cancel
Save