t(minor) call lnwatcher.add_channel from lnworker.add_channel - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit bb21e0182354da0e1685b5b9bb34acc8f4483786 DIR parent 471fdd1d97f2654f11c462e88c1018fb4799668d HTML Author: ThomasV <thomasv@electrum.org> Date: Fri, 14 Feb 2020 14:15:15 +0100 (minor) call lnwatcher.add_channel from lnworker.add_channel Diffstat: M electrum/lnpeer.py | 1 - M electrum/lnworker.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) --- DIR diff --git a/electrum/lnpeer.py b/electrum/lnpeer.py t@@ -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') DIR diff --git a/electrum/lnworker.py b/electrum/lnworker.py t@@ -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')) t@@ -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: