URI: 
       tlnwatcher: use height == TX_HEIGHT_LOCAL to determine channel onchain state - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit dba6cb8a966cc5590162826a5dae6df3b5d25290
   DIR parent e7c02f19351c9b3946b9697d895a017c1daace64
  HTML Author: ThomasV <thomasv@electrum.org>
       Date:   Sun, 16 Feb 2020 12:57:25 +0100
       
       lnwatcher: use height == TX_HEIGHT_LOCAL to determine channel onchain state
       
       Diffstat:
         M electrum/lnwatcher.py               |       6 ++++--
       
       1 file changed, 4 insertions(+), 2 deletions(-)
       ---
   DIR diff --git a/electrum/lnwatcher.py b/electrum/lnwatcher.py
       t@@ -178,11 +178,13 @@ class LNWatcher(AddressSynchronizer):
                keep_watching, spenders = self.inspect_tx_candidate(funding_outpoint, 0)
                funding_txid = funding_outpoint.split(':')[0]
                funding_height = self.get_tx_height(funding_txid)
       +        if funding_height.height == TX_HEIGHT_LOCAL:
       +            return
                closing_txid = spenders.get(funding_outpoint)
       -        if closing_txid is None:
       +        closing_height = self.get_tx_height(closing_txid)
       +        if closing_height.height == TX_HEIGHT_LOCAL:
                    self.network.trigger_callback('update_open_channel', funding_outpoint, funding_txid, funding_height)
                else:
       -            closing_height = self.get_tx_height(closing_txid)
                    closing_tx = self.db.get_transaction(closing_txid)
                    if not closing_tx:
                        self.logger.info(f"channel {funding_outpoint} closed by {closing_txid}. still waiting for tx itself...")