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.
This commit is contained in:
SomberNight 2018-09-16 09:40:07 +02:00
parent 9c919e6478
commit 4d502eb2bf
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9

View file

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