From 42d1e0c7908b558cbf8b9178f4492f80bd4846b9 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Sun, 23 Sep 2018 17:43:51 +0200 Subject: [PATCH] add lnworker in start_network --- electrum/daemon.py | 2 -- electrum/wallet.py | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/electrum/daemon.py b/electrum/daemon.py index ac88082a2..dbe6dff9a 100644 --- a/electrum/daemon.py +++ b/electrum/daemon.py @@ -45,7 +45,6 @@ from .simple_config import SimpleConfig from .exchange_rate import FxThread from .plugin import run_hook from .logging import get_logger -from .lnworker import LNWorker _logger = get_logger(__name__) @@ -261,7 +260,6 @@ class Daemon(DaemonThread): return wallet = Wallet(storage) wallet.start_network(self.network) - wallet.lnworker = LNWorker(wallet, self.network) self.wallets[path] = wallet return wallet diff --git a/electrum/wallet.py b/electrum/wallet.py index c2aa9b78e..1ee9bbf35 100644 --- a/electrum/wallet.py +++ b/electrum/wallet.py @@ -64,6 +64,7 @@ from .interface import RequestTimedOut from .ecc_fast import is_using_fast_ecc from .mnemonic import Mnemonic from .logging import get_logger +from .lnworker import LNWorker if TYPE_CHECKING: from .network import Network @@ -234,6 +235,10 @@ class Abstract_Wallet(AddressSynchronizer): self._coin_price_cache = {} + def start_network(self, network): + AddressSynchronizer.start_network(self, network) + self.lnworker = LNWorker(self, network) + def load_and_cleanup(self): self.load_keystore() self.test_addresses_sanity()