electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 4d502eb2bfc18f20c03595b2e86041e42dfcd6da
parent 9c919e6478a97b10352d4324d9323da0cbec3ac3
Author: SomberNight <somber.night@protonmail.com>
Date:   Sun, 16 Sep 2018 09:40:07 +0200

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.

Diffstat:
Melectrum/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 @@ -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: