URI: 
       tbreach remedy: get spender transaction from LNWatcher's db - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 6e6e829ef73941c992982237e2c3514810613014
   DIR parent 098af027890c8450ee0327a9de63f006a4243991
  HTML Author: ThomasV <thomasv@electrum.org>
       Date:   Mon, 17 Feb 2020 09:19:23 +0100
       
       breach remedy: get spender transaction from LNWatcher's db
       
       Diffstat:
         M electrum/lnwatcher.py               |       8 ++++----
       
       1 file changed, 4 insertions(+), 4 deletions(-)
       ---
   DIR diff --git a/electrum/lnwatcher.py b/electrum/lnwatcher.py
       t@@ -354,10 +354,10 @@ class LNWalletWatcher(LNWatcher):
                    name = sweep_info.name
                    spender_txid = spenders.get(prevout)
                    if spender_txid is not None:
       -                # TODO handle exceptions for network.get_transaction
       -                # TODO don't do network request every time... save tx at least in memory, or maybe wallet file?
       -                spender_tx = await self.network.get_transaction(spender_txid)
       -                spender_tx = Transaction(spender_tx)
       +                spender_tx = self.db.get_transaction(spender_txid)
       +                if not spender_tx:
       +                    keep_watching = True
       +                    continue
                        e_htlc_tx = chan.sweep_htlc(closing_tx, spender_tx)
                        if e_htlc_tx:
                            spender2 = spenders.get(spender_txid+':0')