electrum

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

commit 7e1a784fcaeebf3613d9e64aaa926b7d3d60f5ba
parent 96b699e5341201ffe078be9b45abf5748e0d68e7
Author: SomberNight <somber.night@protonmail.com>
Date:   Wed, 19 Sep 2018 17:44:52 +0200

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'

Diffstat:
Melectrum/gui/qt/main_window.py | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py @@ -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