mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
(minor) call lnwatcher.add_channel from lnworker.add_channel
This commit is contained in:
parent
471fdd1d97
commit
bb21e01823
2 changed files with 1 additions and 2 deletions
|
@ -691,7 +691,6 @@ class Peer(Logger):
|
|||
)
|
||||
chan.open_with_first_pcp(payload['first_per_commitment_point'], remote_sig)
|
||||
self.lnworker.add_channel(chan)
|
||||
self.lnworker.lnwatcher.add_channel(chan.funding_outpoint.to_str(), chan.get_funding_address())
|
||||
|
||||
def validate_remote_reserve(self, payload_field: bytes, dust_limit: int, funding_sat: int) -> int:
|
||||
remote_reserve_sat = int.from_bytes(payload_field, 'big')
|
||||
|
|
|
@ -830,7 +830,6 @@ class LNWallet(LNWorker):
|
|||
push_msat=push_sat * 1000,
|
||||
temp_channel_id=os.urandom(32))
|
||||
self.add_channel(chan)
|
||||
self.lnwatcher.add_channel(chan.funding_outpoint.to_str(), chan.get_funding_address())
|
||||
self.network.trigger_callback('channels_updated', self.wallet)
|
||||
self.wallet.add_transaction(funding_tx) # save tx as local into the wallet
|
||||
self.wallet.set_label(funding_tx.txid(), _('Open channel'))
|
||||
|
@ -842,6 +841,7 @@ class LNWallet(LNWorker):
|
|||
def add_channel(self, chan):
|
||||
with self.lock:
|
||||
self.channels[chan.channel_id] = chan
|
||||
self.lnwatcher.add_channel(chan.funding_outpoint.to_str(), chan.get_funding_address())
|
||||
|
||||
@log_exceptions
|
||||
async def add_peer(self, connect_str: str) -> Peer:
|
||||
|
|
Loading…
Add table
Reference in a new issue