mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
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:
parent
9c919e6478
commit
4d502eb2bf
1 changed files with 2 additions and 3 deletions
|
@ -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…
Add table
Reference in a new issue