From d7dee45ee914e0fd16e5f02c1ea2141e87048ef3 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Tue, 10 Jan 2023 11:56:25 +0100 Subject: [PATCH] CLI: decode_invoice: show the last hop of routing hints --- electrum/invoices.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/electrum/invoices.py b/electrum/invoices.py index 8bc9b5bea..be5d26644 100644 --- a/electrum/invoices.py +++ b/electrum/invoices.py @@ -266,7 +266,8 @@ class Invoice(StoredObject): 'description': self._lnaddr.get_description(), 'exp': self._lnaddr.get_expiry(), 'time': self._lnaddr.date, - # 'tags': str(lnaddr.tags), + # show the last hop of routing hints. (our invoices only have one hop) + 'r_tags': [ str((a.hex(),b.hex(),c,d,e)) for a,b,c,d,e in self._lnaddr.get_routing_info('r')[-1]] }) return d