Browse Source

add lnworker in start_network

regtest_lnd
ThomasV 6 years ago
committed by SomberNight
parent
commit
42d1e0c790
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 2
      electrum/daemon.py
  2. 5
      electrum/wallet.py

2
electrum/daemon.py

@ -45,7 +45,6 @@ from .simple_config import SimpleConfig
from .exchange_rate import FxThread from .exchange_rate import FxThread
from .plugin import run_hook from .plugin import run_hook
from .logging import get_logger from .logging import get_logger
from .lnworker import LNWorker
_logger = get_logger(__name__) _logger = get_logger(__name__)
@ -261,7 +260,6 @@ class Daemon(DaemonThread):
return return
wallet = Wallet(storage) wallet = Wallet(storage)
wallet.start_network(self.network) wallet.start_network(self.network)
wallet.lnworker = LNWorker(wallet, self.network)
self.wallets[path] = wallet self.wallets[path] = wallet
return wallet return wallet

5
electrum/wallet.py

@ -64,6 +64,7 @@ from .interface import RequestTimedOut
from .ecc_fast import is_using_fast_ecc from .ecc_fast import is_using_fast_ecc
from .mnemonic import Mnemonic from .mnemonic import Mnemonic
from .logging import get_logger from .logging import get_logger
from .lnworker import LNWorker
if TYPE_CHECKING: if TYPE_CHECKING:
from .network import Network from .network import Network
@ -234,6 +235,10 @@ class Abstract_Wallet(AddressSynchronizer):
self._coin_price_cache = {} self._coin_price_cache = {}
def start_network(self, network):
AddressSynchronizer.start_network(self, network)
self.lnworker = LNWorker(self, network)
def load_and_cleanup(self): def load_and_cleanup(self):
self.load_keystore() self.load_keystore()
self.test_addresses_sanity() self.test_addresses_sanity()

Loading…
Cancel
Save