Browse Source

qt main_window: do not unregister on shutdown

this is handled differently in lightning, see commit

commit 6e355601261a60d143561f15760cc48f9c81d000
Author: ThomasV <thomasv@electrum.org>
Date:   Sun Jun 3 10:07:56 2018 +0200

    integrate channels_list with existing framework
regtest_lnd
Janus 6 years ago
committed by SomberNight
parent
commit
bbdf35604e
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 2
      electrum/gui/qt/main_window.py
  2. 2
      electrum/lnrouter.py

2
electrum/gui/qt/main_window.py

@ -3354,8 +3354,6 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
self.wallet.thread.stop()
if self.network:
self.network.unregister_callback(self.on_network)
self.network.unregister_callback(self.on_quotes)
self.network.unregister_callback(self.on_history)
self.config.set_key("is_maximized", self.isMaximized())
if not self.isMaximized():
g = self.geometry()

2
electrum/lnrouter.py

@ -354,7 +354,7 @@ class ChannelDB(JsonDB):
def capacity(self):
# capacity of the network
return sum(c.capacity_sat for c in self._id_to_channel_info.values())
return sum(c.capacity_sat for c in self._id_to_channel_info.values() if c.capacity_sat is not None)
def get_channel_info(self, channel_id: bytes) -> Optional[ChannelInfo]:
return self._id_to_channel_info.get(channel_id, None)

Loading…
Cancel
Save