1
0

qt: channel_details: add more info: sent/received, channel id, funding tx, short channel id, node id

This commit is contained in:
Janus
2018-11-27 21:43:28 +01:00
committed by ThomasV
parent 762d8be84f
commit 864d910888
4 changed files with 91 additions and 21 deletions

View File

@@ -664,3 +664,9 @@ class EncumberedTransaction(NamedTuple("EncumberedTransaction", [('name', str),
NUM_MAX_HOPS_IN_PAYMENT_PATH = 20
NUM_MAX_EDGES_IN_PAYMENT_PATH = NUM_MAX_HOPS_IN_PAYMENT_PATH + 1
def format_short_channel_id(short_channel_id: Optional[bytes]):
if not short_channel_id:
return _('Not yet available')
return str(int.from_bytes(short_channel_id[:3], 'big')) \
+ 'x' + str(int.from_bytes(short_channel_id[3:6], 'big')) \
+ 'x' + str(int.from_bytes(short_channel_id[6:], 'big'))