commit f3d1f71e94f3f4e70776352ac1ad889e0bc45e2f parent edff357fad87768268e52be7797bfc3544af1fa1 Author: SomberNight <somber.night@protonmail.com> Date: Mon, 22 Oct 2018 15:05:58 +0200 lnchan: set diagnostic_name previously was only set for tests Diffstat:
M | electrum/lnchan.py | | | 7 | ++++++- |
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/electrum/lnchan.py b/electrum/lnchan.py @@ -93,7 +93,12 @@ def str_bytes_dict_to_save(x): class Channel(PrintError): def diagnostic_name(self): - return str(self.name) + if self.name: + return str(self.name) + try: + return f"lnchan_{bh2u(self.channel_id[-4:])}" + except: + return super().diagnostic_name() def __init__(self, state, name = None): assert 'local_state' not in state