fix field naming for CLN 23.05 release and a typo

This commit is contained in:
Borsche 2023-05-26 12:31:52 +00:00 committed by Pavol Rusnak
parent 44d193d924
commit d055a1f8b4
2 changed files with 9 additions and 3 deletions

View file

@ -125,8 +125,14 @@ class ClnClient:
cin = fe["in_channel"]
cout = fe["out_channel"]
ts = int(fe.get("resolved_time", 0))
fee = fe["fee"]
amount_in = fe["in_msatoshi"] // 1000
#
# 23.05 naming change renamed everything to _msat
if "fee" in fe:
fee = fe["fee"]
amount_in = fe["in_msatoshi"] // 1000
else:
fee = fe["fee_msat"]
amount_in = fe["in_msat"] // 1000
if cin in self.channels:
self.channels[cin].last_forward = max(
ts, self.channels[cin].last_forward

View file

@ -177,7 +177,7 @@ def channel_table(
columns += [
f"{c.ins}",
f"{c.ins_percent:.0%}",
f"{c.outs}"
f"{c.outs}",
f"{c.outs_percent:.0%}",
]
if show_remote_fees: