From e6fc8868b15105c834cff4ff98e826e8dd4a5800 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Thu, 13 Jun 2019 18:04:00 +0200 Subject: [PATCH] qt channels list: add "short channel id" column --- electrum/gui/qt/channels_list.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/electrum/gui/qt/channels_list.py b/electrum/gui/qt/channels_list.py index 5c8bdeca1..3217ec63e 100644 --- a/electrum/gui/qt/channels_list.py +++ b/electrum/gui/qt/channels_list.py @@ -10,7 +10,7 @@ from PyQt5.QtWidgets import QMenu, QHBoxLayout, QLabel, QVBoxLayout, QGridLayout from electrum.util import inv_dict, bh2u, bfh from electrum.i18n import _ from electrum.lnchannel import Channel -from electrum.lnutil import LOCAL, REMOTE, ConnStringFormatError +from electrum.lnutil import LOCAL, REMOTE, ConnStringFormatError, format_short_channel_id from .util import MyTreeView, WindowModalDialog, Buttons, OkButton, CancelButton, EnterButton, WWLabel, WaitingDialog from .amountedit import BTCAmountEdit @@ -25,12 +25,14 @@ class ChannelsList(MyTreeView): update_single_row = QtCore.pyqtSignal(Channel) class Columns(IntEnum): - NODE_ID = 0 - LOCAL_BALANCE = 1 - REMOTE_BALANCE = 2 - CHANNEL_STATUS = 3 + SHORT_CHANID = 0 + NODE_ID = 1 + LOCAL_BALANCE = 2 + REMOTE_BALANCE = 3 + CHANNEL_STATUS = 4 headers = { + Columns.SHORT_CHANID: _('Short Channel ID'), Columns.NODE_ID: _('Node ID'), Columns.LOCAL_BALANCE: _('Local'), Columns.REMOTE_BALANCE: _('Remote'), @@ -58,6 +60,7 @@ class ChannelsList(MyTreeView): label += ' (+' + self.parent.format_amount(bal_other - bal_minus_htlcs_other) + ')' labels[subject] = label return [ + format_short_channel_id(chan.short_channel_id), bh2u(chan.node_id), labels[LOCAL], labels[REMOTE],