URI: 
       tfollow-up prev - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 4a8ee1818a43d2ae7b1972fab48fe47849a49eb3
   DIR parent 88658f9c2c68e758272d646b353ed6cd29dd5131
  HTML Author: SomberNight <somber.night@protonmail.com>
       Date:   Mon, 24 Feb 2020 18:52:33 +0100
       
       follow-up prev
       
       E/W | lnwatcher.LNWalletWatcher | Exception in on_network_update: AssertionError('None')
       Traceback (most recent call last):
         File "...\electrum\electrum\util.py", line 1035, in wrapper
           return await func(*args, **kwargs)
         File "...\electrum\electrum\lnwatcher.py", line 174, in on_network_update
           await self.check_onchain_situation(address, outpoint)
         File "...\electrum\electrum\lnwatcher.py", line 184, in check_onchain_situation
           closing_height = self.get_tx_height(closing_txid)
         File "...\electrum\electrum\address_synchronizer.py", line 597, in get_tx_height
           verified_tx_mined_info = self.db.get_verified_tx(tx_hash)
         File "...\electrum\electrum\json_db.py", line 44, in wrapper
           return func(self, *args, **kwargs)
         File "...\electrum\electrum\wallet_db.py", line 859, in get_verified_tx
           assert isinstance(txid, str), f"{repr(txid)}"
       AssertionError: None
       
       Diffstat:
         M electrum/address_synchronizer.py    |       4 +++-
       
       1 file changed, 3 insertions(+), 1 deletion(-)
       ---
   DIR diff --git a/electrum/address_synchronizer.py b/electrum/address_synchronizer.py
       t@@ -584,7 +584,7 @@ class AddressSynchronizer(Logger):
                    return cached_local_height
                return self.network.get_local_height() if self.network else self.db.get('stored_height', 0)
        
       -    def add_future_tx(self, tx: Transaction, num_blocks: int) -> None:
       +    def add_future_tx(self, tx: Transaction, num_blocks: int) -> bool:
                assert num_blocks > 0, num_blocks
                with self.lock:
                    tx_was_added = self.add_transaction(tx)
       t@@ -593,6 +593,8 @@ class AddressSynchronizer(Logger):
                    return tx_was_added
        
            def get_tx_height(self, tx_hash: str) -> TxMinedInfo:
       +        if tx_hash is None:  # ugly backwards compat...
       +            return TxMinedInfo(height=TX_HEIGHT_LOCAL, conf=0)
                with self.lock:
                    verified_tx_mined_info = self.db.get_verified_tx(tx_hash)
                    if verified_tx_mined_info: