tLNWatcher: implement diagnostic_name; for nicer log lines - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit 9380b331e472e00d9870eb4f57c0319c1da123c5 (DIR) parent 6bd1a04aee3d1adc052731793e7ebfb5023f7f56 (HTM) Author: SomberNight <somber.night@protonmail.com> Date: Fri, 18 Sep 2020 20:54:09 +0200 LNWatcher: implement diagnostic_name; for nicer log lines Diffstat: M electrum/lnwatcher.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- (DIR) diff --git a/electrum/lnwatcher.py b/electrum/lnwatcher.py t@@ -276,6 +276,9 @@ class WatchTower(LNWatcher): # and a queue for seeing which txs are being published self.tx_progress = {} # type: Dict[str, ListenerItem] + def diagnostic_name(self): + return "local_tower" + async def start_watching(self): # I need to watch the addresses from sweepstore lst = await self.sweepstore.list_channels() t@@ -344,9 +347,12 @@ class WatchTower(LNWatcher): class LNWalletWatcher(LNWatcher): def __init__(self, lnworker: 'LNWallet', network: 'Network'): - LNWatcher.__init__(self, network) self.network = network self.lnworker = lnworker + LNWatcher.__init__(self, network) + + def diagnostic_name(self): + return f"{self.lnworker.wallet.diagnostic_name()}-LNW" @ignore_exceptions @log_exceptions