mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
follow-up prev: fix race between load_wallet and network events
[127.0.0.1] Exception in wrapper_func : AttributeError 'ElectrumWindow' object has no attribute 'wallet' Traceback (most recent call last): File "/home/user/wspace/electrum/electrum/util.py", line 839, in f2 return await f(*args, **kwargs) File "/home/user/wspace/electrum/electrum/interface.py", line 245, in wrapper_func return await func(self, *args, **kwargs) File "/home/user/wspace/electrum/electrum/interface.py", line 260, in run await self.open_session(ssl_context, exit_early=False) File "/home/user/wspace/electrum/electrum/interface.py", line 357, in open_session await group.spawn(self.monitor_connection()) File "/usr/local/lib/python3.6/dist-packages/aiorpcx/curio.py", line 241, in __aexit__ await self.join(wait=self._wait) File "/usr/local/lib/python3.6/dist-packages/aiorpcx/curio.py", line 214, in join raise task.exception() File "/home/user/wspace/electrum/electrum/address_synchronizer.py", line 173, in job await group.spawn(self.synchronizer.main()) File "/usr/local/lib/python3.6/dist-packages/aiorpcx/curio.py", line 241, in __aexit__ await self.join(wait=self._wait) File "/usr/local/lib/python3.6/dist-packages/aiorpcx/curio.py", line 214, in join raise task.exception() File "/home/user/wspace/electrum/electrum/synchronizer.py", line 181, in main self.wallet.network.trigger_callback('wallet_updated', self.wallet) File "/home/user/wspace/electrum/electrum/network.py", line 267, in trigger_callback callback(event, *args) File "/home/user/wspace/electrum/electrum/gui/qt/main_window.py", line 300, in on_network if wallet == self.wallet: AttributeError: 'ElectrumWindow' object has no attribute 'wallet'
This commit is contained in:
parent
96b699e534
commit
7e1a784fca
1 changed files with 1 additions and 1 deletions
|
@ -107,6 +107,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
|||
self.setup_exception_hook()
|
||||
|
||||
self.network = gui_object.daemon.network
|
||||
self.wallet = wallet
|
||||
self.fx = gui_object.daemon.fx
|
||||
self.invoices = wallet.invoices
|
||||
self.contacts = wallet.contacts
|
||||
|
@ -356,7 +357,6 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
|||
@profiler
|
||||
def load_wallet(self, wallet):
|
||||
wallet.thread = TaskThread(self, self.on_error)
|
||||
self.wallet = wallet
|
||||
self.update_recently_visited(wallet.storage.path)
|
||||
# update(==init) all tabs; expensive for large wallets..
|
||||
# so delay it somewhat, hence __init__ can finish and the window can appear sooner
|
||||
|
|
Loading…
Add table
Reference in a new issue