This fixes a bug where if one runs `wallet.clear_history()` they would see exceptions later:
```
Traceback (most recent call last):
File "/home/user/wspace/electrum/electrum/gui/qt/main_window.py", line 866, in timer_actions
self.update_wallet()
File "/home/user/wspace/electrum/electrum/gui/qt/main_window.py", line 1021, in update_wallet
self.update_tabs()
File "/home/user/wspace/electrum/electrum/gui/qt/main_window.py", line 1033, in update_tabs
self.utxo_list.update()
File "/home/user/wspace/electrum/electrum/gui/qt/utxo_list.py", line 103, in update
self.refresh_row(name, idx)
File "/home/user/wspace/electrum/electrum/gui/qt/utxo_list.py", line 124, in refresh_row
parents = self.wallet.get_tx_parents(txid)
File "/home/user/wspace/electrum/electrum/wallet.py", line 885, in get_tx_parents
result.update(self.get_tx_parents(_txid))
File "/home/user/wspace/electrum/electrum/wallet.py", line 881, in get_tx_parents
for i, txin in enumerate(tx.inputs()):
AttributeError: 'NoneType' object has no attribute 'inputs'
```
This is related to the privacy analysis, which assumes that for each tx item in the history list
we should have the raw tx in the db. This is no longer true after wallet.clear_history(), if
the wallet has certain LN channels. E.g. an already redeemed channel that was local-force-closed,
as that closing tx is not related to the wallet directly.
In commit 3541ecb576, we decided not to watch already redeemed channels.
This is potentially good for e.g. privacy, as the server would otherwise see us subscribe to that chan.
However it means that after running wallet.clear_history() txs related to the channel but not to the
wallet won't be re-downloaded.
Instead, now if there are missing txs for a redeemed channel, we start watching it, hence the
synchronizer will re-downloaded the txs.
Traceback (most recent call last):
File "/home/user/wspace/electrum/electrum/gui/qt/transaction_dialog.py", line 255, in _open_internal_link
self.main_window.do_process_from_txid(txid=target, parent=self)
File "/home/user/wspace/electrum/electrum/gui/qt/main_window.py", line 2212, in do_process_from_txid
self.show_transaction(tx)
File "/home/user/wspace/electrum/electrum/gui/qt/main_window.py", line 1079, in show_transaction
show_transaction(tx, parent=self, desc=tx_desc)
File "/home/user/wspace/electrum/electrum/gui/qt/transaction_dialog.py", line 351, in show_transaction
d = TxDialog(tx, parent=parent, desc=desc, prompt_if_unsaved=prompt_if_unsaved)
File "/home/user/wspace/electrum/electrum/gui/qt/transaction_dialog.py", line 449, in __init__
self.update()
File "/home/user/wspace/electrum/electrum/gui/qt/transaction_dialog.py", line 667, in update
tx_mined_status = self.wallet.lnworker.lnwatcher.adb.get_tx_height(txid)
AttributeError: 'NoneType' object has no attribute 'adb'
- add a new event, 'adb_removed_tx'
- new wallet method: get_tx_parents
- number of parents is shown in coins tab
- detailed list of parents is shown in dialog
```
629.08 | E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
File ".../electrum/electrum/gui/qt/invoice_list.py", line 170, in <lambda>
menu.addAction(_("Pay") + "...", lambda: self.send_tab.do_pay_invoice(invoice))
File ".../electrum/electrum/gui/qt/send_tab.py", line 573, in do_pay_invoice
self.pay_onchain_dialog(self.window.get_coins(), invoice.outputs)
File ".../electrum/electrum/gui/qt/send_tab.py", line 251, in pay_onchain_dialog
self.window.show_transaction(tx)
File ".../electrum/electrum/gui/qt/main_window.py", line 1074, in show_transaction
show_transaction(tx, parent=self, desc=tx_desc)
File ".../electrum/electrum/gui/qt/transaction_dialog.py", line 351, in show_transaction
d = TxDialog(tx, parent=parent, desc=desc, prompt_if_unsaved=prompt_if_unsaved)
File ".../electrum/electrum/gui/qt/transaction_dialog.py", line 450, in __init__
self.set_title()
File ".../electrum/electrum/gui/qt/transaction_dialog.py", line 858, in set_title
self.setWindowTitle(_("Transaction") + ' ' + self.tx.txid())
TypeError: can only concatenate str (not "NoneType") to str
```