(fix) allow opening LN wallet with --offline
This commit is contained in:
@@ -522,6 +522,8 @@ class LNWallet(LNWorker):
|
||||
|
||||
self.pending_payments = defaultdict(asyncio.Future) # type: Dict[bytes, asyncio.Future[BarePaymentAttemptLog]]
|
||||
|
||||
self.swap_manager = SwapManager(wallet=self.wallet, lnworker=self)
|
||||
|
||||
@property
|
||||
def channels(self) -> Mapping[bytes, Channel]:
|
||||
"""Returns a read-only copy of channels."""
|
||||
@@ -581,7 +583,7 @@ class LNWallet(LNWorker):
|
||||
self.lnwatcher = LNWalletWatcher(self, network)
|
||||
self.lnwatcher.start_network(network)
|
||||
self.network = network
|
||||
self.swap_manager = SwapManager(self.wallet, network)
|
||||
self.swap_manager.start_network(network=network, lnwatcher=self.lnwatcher)
|
||||
|
||||
for chan in self.channels.values():
|
||||
self.lnwatcher.add_channel(chan.funding_outpoint.to_str(), chan.get_funding_address())
|
||||
@@ -703,7 +705,7 @@ class LNWallet(LNWorker):
|
||||
out[closing_txid] = item
|
||||
# add info about submarine swaps
|
||||
settled_payments = self.get_settled_payments()
|
||||
current_height = self.network.get_local_height()
|
||||
current_height = self.wallet.get_local_height()
|
||||
for payment_hash_hex, swap in self.swap_manager.swaps.items():
|
||||
txid = swap.spending_txid if swap.is_reverse else swap.funding_txid
|
||||
if txid is None:
|
||||
|
||||
Reference in New Issue
Block a user