lightningd: add in_htlc_id / out_htlc_id to listforwards.

And document that we never know payment_hash.

Changelog-Added: JSON-RPC: `listforwards` now shows `in_htlc_id` and `out_htlc_id`
Changelog-Changed: JSON-RPC: `listforwards` now never shows `payment_hash`; use `listhtlcs`.
This commit is contained in:
Rusty Russell
2022-09-19 10:19:53 +09:30
committed by Christian Decker
parent d7c1325e38
commit 311807ff1f
15 changed files with 118 additions and 63 deletions

View File

@@ -1353,24 +1353,30 @@ def test_forward_event_notification(node_factory, bitcoind, executor):
expect = stats[0].copy()
# First event won't have conclusion.
del expect['resolved_time']
del expect['out_htlc_id']
expect['status'] = 'offered'
assert plugin_stats[0] == expect
expect = stats[0].copy()
del expect['out_htlc_id']
assert plugin_stats[1] == expect
expect = stats[1].copy()
del expect['resolved_time']
del expect['out_htlc_id']
expect['status'] = 'offered'
assert plugin_stats[2] == expect
expect = stats[1].copy()
del expect['out_htlc_id']
assert plugin_stats[3] == expect
expect = stats[2].copy()
del expect['failcode']
del expect['failreason']
del expect['out_htlc_id']
expect['status'] = 'offered'
assert plugin_stats[4] == expect
expect = stats[2].copy()
del expect['out_htlc_id']
assert plugin_stats[5] == expect