mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
add lnworker in start_network
This commit is contained in:
parent
356149cd52
commit
dd35a5d0a0
2 changed files with 5 additions and 2 deletions
|
@ -44,7 +44,6 @@ from .commands import known_commands, Commands
|
||||||
from .simple_config import SimpleConfig
|
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 .lnworker import LNWorker
|
|
||||||
|
|
||||||
def get_lockfile(config: SimpleConfig):
|
def get_lockfile(config: SimpleConfig):
|
||||||
return os.path.join(config.path, 'daemon')
|
return os.path.join(config.path, 'daemon')
|
||||||
|
@ -251,7 +250,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
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,7 @@ from .paymentrequest import (PR_PAID, PR_UNPAID, PR_UNKNOWN, PR_EXPIRED,
|
||||||
InvoiceStore)
|
InvoiceStore)
|
||||||
from .contacts import Contacts
|
from .contacts import Contacts
|
||||||
from .interface import RequestTimedOut
|
from .interface import RequestTimedOut
|
||||||
|
from .lnworker import LNWorker
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from .network import Network
|
from .network import Network
|
||||||
|
@ -183,6 +184,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.load_addresses()
|
self.load_addresses()
|
||||||
|
|
Loading…
Add table
Reference in a new issue